[swift-evolution] [Manifesto] Ownership

John McCall rjmccall at apple.com
Fri Feb 17 14:08:09 CST 2017

> On Feb 17, 2017, at 2:51 PM, Xiaodi Wu <xiaodi.wu at gmail.com> wrote:
> What a read! Two questions off the bat:
> 1. Any preliminary estimates as to what the performance cost of dynamic enforcement is shaping up to be, at least in an initial implementation? It'd have a direct impact on how "opt-in" the additional tools really are.

We don't have an initial implementation yet, sorry.  I'm sure it'll vary a lot by the application.  My hope is that it'll just be a few extra non-atomic loads and stores around every access, but it's possible that we'll need to make at least one of those an atomic exchange because it's legal for multiple threads to read concurrently.  It hinges in part on how comfortable we are with allowing conflicts to escape dynamic detection in complex concurrent cases.
> 2. Without the intention of initiating premature bikeshedding, what was the thought behind proposing `inout foo = ...` vs the seemingly more obvious `var foo: inout = ...`, given that `inout` was moved to the type side of the colon?

Well, I think it's pretty semantically different from a var.  It's also really tempting to read the latter as "a var of inout type", suggesting that a re-assignment would bind it to different storage, which is not how it works, should work, or even could work.


> On Fri, Feb 17, 2017 at 11:11 AM, John McCall via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> On Feb 17, 2017, at 12:08 PM, John McCall <rjmccall at apple.com <mailto:rjmccall at apple.com>> wrote:
>>> On Feb 17, 2017, at 4:50 AM, Adrian Zubarev <adrian.zubarev at devandartist.com <mailto:adrian.zubarev at devandartist.com>> wrote:
>>> Hi John, would you mind creating a markdown document for this manifesto in https://github.com/apple/swift/tree/master/docs <https://github.com/apple/swift/tree/master/docs>? :)
>> Yes, it should go in the repository.  That commit is pending, but the in meantime, you can see the document properly rendered at:
>>   https://github.com/rjmccall/swift/blob/4c67c1d45b6f9649cc39bbb296d63663c1ef841f/docs/OwnershipManifesto.md <https://github.com/rjmccall/swift/blob/4c67c1d45b6f9649cc39bbb296d63663c1ef841f/docs/OwnershipManifesto.md>
> Ah, and of course the second I send this, my PR gets merged. :)
> The new URL is:
>   https://github.com/apple/swift/blob/master/docs/OwnershipManifesto.md <https://github.com/apple/swift/blob/master/docs/OwnershipManifesto.md>
> John.
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org <mailto:swift-evolution at swift.org>
> https://lists.swift.org/mailman/listinfo/swift-evolution <https://lists.swift.org/mailman/listinfo/swift-evolution>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20170217/84bd9047/attachment.html>

More information about the swift-evolution mailing list