-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[CoroutineAccessors] Pitch. #2596
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
base: main
Are you sure you want to change the base?
[CoroutineAccessors] Pitch. #2596
Conversation
} | ||
``` | ||
|
||
If `read` is specified, `get` cannot also be specified. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What implementations are compatible with a read
protocol requirement? I imagine that a stored property is and a computed property with a get
accessor is not? What about unsafeAddress
accessors?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for raising this. Actually, stored, get
, read
, and unsafeAddress
are all compatible with a read
requirement. The compiler synthesizes a read
in terms of the implementation the user provides. I'll clarify this in the text.
7b45299
to
5b22f12
Compare
875a739
to
613bc4c
Compare
613bc4c
to
897422e
Compare
No description provided.