[swift-evolution] [swift-evolution-announce] [Review] SE-0125: Remove NonObjectiveCBase and isUniquelyReferenced
Brent Royal-Gordon
brent at architechies.com
Wed Jul 20 09:07:06 CDT 2016
> On Jul 20, 2016, at 6:53 AM, Dave Abrahams <dave at boostpro.com> 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, we could even call it something along the lines of `needsCopyBeforeMutating(_:)`, which would strongly imply it was unsuitable for any other purpose.
--
Brent Royal-Gordon
Architechies
More information about the swift-evolution
mailing list