[swift-evolution] [Concurrency] async/await + actors

Brent Royal-Gordon brent at architechies.com
Sat Aug 19 21:39:00 CDT 2017

> On Aug 19, 2017, at 1:29 PM, Michel Fortin via swift-evolution <swift-evolution at swift.org> wrote:
> I'm not actually that interested in the meaning of value semantics here. I'm debating the appropriateness of determining whether something can be done in another thread based on the type a function is attached to. Because that's what the ValueSemantical protocol wants to do. ValueSemantical, as a protocol, is whitelisting the whole type while in reality it should only vouch for a specific set of safe functions on that type.

To state more explicitly what I think you might be implying here: In principle, we could have developers annotate value-semantic *members* instead of value-semantic *types* and only allow value-semantic members to be used on parameters to an actor. But I worry this might spread through the type system like `const` in C++, forcing large numbers of APIs to annotate parameters with `value` and restrict themselves to value-only APIs just in case they happen to be used in an actor.

Brent Royal-Gordon

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170819/31bd21fd/attachment.html>

More information about the swift-evolution mailing list