[swift-evolution] Pitch: Remove `NonObjectiveCBase` and replace `isUniquelyReferenced` by `isUniquelyReferencedUnsafe`

Jaden Geller jgeller at caltech.edu
Sat Jul 16 17:49:40 CDT 2016


Some explanation of the benefit of keeping both `isUniquelyReferencedUnsafe` and `isUniqueReferencedNonObjC` would be useful. I’m not entirely sure why the latter is useful. If it is useful, I’m not sure why we can’t just have `isUniquelyReferencedUnsafe` and `isObjC`.

> On Jul 16, 2016, at 1:21 PM, Dmitri Gribenko via swift-evolution <swift-evolution at swift.org> wrote:
> 
> On Sat, Jul 16, 2016 at 12:47 PM, Arnold Schwaighofer via
> swift-evolution <swift-evolution at swift.org> wrote:
>> ## Proposed solution
>> 
>> Replace `isUniquelyReferenced<T : NonObjectiveCBase>` by
>> `isUniquelyReferencedUnsafe<T: AnyObject>` and remove the `NonObjectiveCBase`
>> class from the standard library.
> 
> Thank you for this proposal!
> 
> For presentation and clarity, could you show the full family of
> `isUniquely*` functions in the design section, including those
> functions that you are not proposing to change?  This will make it
> easier to see what choices users will get.  It would be also great to
> include the API of similar ManagedBuffer and ManagedBufferPointer
> APIs, if any exist.
> 
> Dmitri
> 
> -- 
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution



More information about the swift-evolution mailing list