> 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, 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

_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to