[swift-evolution] Proposal: Weak Native Swift Containers
Chris Lattner
clattner at apple.com
Thu Dec 10 19:27:42 CST 2015
> On Dec 10, 2015, at 4:08 PM, John McCall via swift-evolution <swift-evolution at swift.org> wrote:
>
>> On Dec 10, 2015, at 3:31 PM, Riley Testut via swift-evolution <swift-evolution at swift.org <mailto:swift-evolution at swift.org>> wrote:
>> Using box types solves the portability problems, but it still means O(n) access for clients who want to access the non-boxed values directly. Additionally, these objects aren’t automatically removed from the collection when their values are nil-ed out, which is unfortunate.
>>
>> Side note: this is the route I originally tried to take, but unfortunately the Swift doesn’t work well with weak references to protocol types…
>
> Really? Please file a bug about this; I’ve been working in this area recently.
It should work with protocols, but they must be class bound.
-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151210/b38bddce/attachment.html>
More information about the swift-evolution
mailing list