on Wed Jul 20 2016, Brent Royal-Gordon <[email protected]> wrote:
>> On Jul 20, 2016, at 6:53 AM, Dave Abrahams <[email protected]> wrote: >> >> There is; it's basically impossible to implement reliably given the >> state of Objective-C reference-counting. I'll let Greg Parker explain >> the details, as he has many times to me (but I don't retain them as well >> as he does). > > I don't necessarily need to know them (although I'd be curious to hear). > > I think something that implies the possibility of false negatives, > like `isKnownUniquelyReferenced(_:)` or (flipping the sense of the > return value) `mayBeShared(_:)`, is probably the best strategy. Or, if > COW is the only use case we want to support, It's not the only use case for ManagedBuffer[Pointer], if that's what you mean. > we could even call it something along the lines of > `needsCopyBeforeMutating(_:)`, which would strongly imply it was > unsuitable for any other purpose. -- Dave _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
