[swift-evolution] [Manifesto] Ownership
matthew at anandabits.com
Sat Feb 18 10:08:59 CST 2017
This is fantastic! I’ve been eagerly anticipating this. It looks very much as I was hoping it would. I can’t wait to see this vision come to life!
You only show a mutating generator example. Do you also plan to allow shared generators?
One topic you don’t touch on that feels related is the ability to use RAII and rely on deferred deinit to ensure an owned resource isn’t released before the scope exits. I can imagine something like `defer let resource = MyResource()`. It may also be interesting to support “defer only” types to force a compiler error where non-deferred use would be incorrect. What do you think?
> On Feb 17, 2017, at 11:08 AM, John McCall via swift-evolution <swift-evolution at swift.org> 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>
> 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...
More information about the swift-evolution