> On Jul 16, 2016, at 6:46 PM, Arnold Schwaighofer via swift-evolution 
> <swift-evolution@swift.org> wrote:
> 
> Replace isUniquelyReferenced<T : NonObjectiveCBase> by 
> isUniquelyReferencedUnsafe<T: AnyObject> and remove the NonObjectiveCBase 
> class from the standard library.
> 
> 

So we’ll have:

- isUniquelyReferencedNonObjC(object): true iff object is uniquely referenced 
and NonObjC

- isUniquelyReferencedUnsafe(object): true iff object is uniquely reference, 
assert NonObjC

I’m going to be picky. The “Unsafe” suffix doesn’t make sense to me. If you 
think this is an unsafe API then it should be:
“unsafeIsUniquelyReferenced”.

But I don’t really see how it is unsafe in the usual sense. If you want to 
convey that the programmer needs to satisfy some precondition, which is not 
generally associated with unsafety, then it should be:
“isUniquelyReferencedAssumingNonObjC”

Frankly, the type was a nicer way to do this, by I understand removing it from 
the API surface.

-Andy
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to