[swift-evolution] Remove isUniquelyReferenced or isUniquelyReferencedNonObjC?
jgroff at apple.com
Thu Dec 10 11:03:12 CST 2015
> On Dec 10, 2015, at 9:00 AM, Chris Eidhof <chris at eidhof.nl> wrote:
> I think the name isUniquelyReferenced is better, and it should use the constraint to make sure it only works on Swift objects. That way there’s no confusion.
I don't think the constraint is desirable. For most ObjC objects we just conservatively return 'false', but it isn't unreasonable to think that some ObjC types might be able to reliably answer isUniquelyReferenced in the future. Furthermore, IIRC the constraint works by requiring a `NonObjC` base class, and enforcing a common base class is not an acceptable design constraint for pure Swift code.
More information about the swift-evolution