Avatar
まったく当てにならないけど、 The Swift Programming Language には
Properties associate values with a particular class, structure, or enumeration.
とは書かれてる。 Swift におけるプロパティの定義がわからないなぁ・・・。広義にはすべての変数や定数はプロパティなのかな?
2:59 AM
=== ↓の S はどこから来たの?? protocol GameObject { associatedtype ObjectShape: Shape var shape: ObjectShape } struct Player: GameObject { var shape: some Shape { ... } /* infers typealias Shape = opaque result type of Player.shape */ } let sv: S.SomeType // ok: names the opaque result type of S.someValue() sv = S().someValue() // ok: returns the same opaque result type https://github.com/apple/swift-evolution/blob/master/proposals/0244-opaque-result-types.md#associated-type-inference (edited)
This maintains proposals for changes and user-visible enhancements to the Swift Programming Language. - apple/swift-evolution