<div dir="ltr"><div>I thought this *was* the proposal on swift-evolution.<br></div><div>Or do you mean <a href="http://github.com/apple/swift-evolution">github.com/apple/swift-evolution</a>?<br></div>Does this need a full proposal and review-cycle,<br>as well as a number and markdown-file on the above repository?<br><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 10, 2015 at 9:12 PM, Dmitri Gribenko via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><span class=""><div class="gmail_quote">On Thu, Dec 10, 2015 at 11:25 AM, Chris Eidhof via swift-evolution <span dir="ltr">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div><span><blockquote type="cite"><div>On 10 Dec 2015, at 12:38, Andrew Trick &lt;<a href="mailto:atrick@apple.com" target="_blank">atrick@apple.com</a>&gt; wrote:</div><br><div><blockquote type="cite" style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br>On Dec 10, 2015, at 8:59 AM, Joe Groff &lt;<a href="mailto:jgroff@apple.com" target="_blank">jgroff@apple.com</a>&gt; wrote:<br><br><br><blockquote type="cite">On Dec 10, 2015, at 8:56 AM, Joe Groff via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br><br><br><blockquote type="cite">On Dec 10, 2015, at 8:50 AM, Chris Eidhof via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>&gt; wrote:<br><br>There are two functions isUniquelyReferencedNonObjC and isUniquelyReferenced, which do exactly the same thing. One has a more constrained type, only accepting Swift objects. The other one accepts ObjC objects as well, but always returns false. Regardless of whether it should (could?) work for ObjC objects, I think this duplication is confusing (it has confused me for a long time, and I’m happy that I can now see they’re implemented in exactly the same way).<br><br>I think probably accepting just Swift objects would be the right thing to do, as the function is useless for ObjC objects.<br></blockquote><br>+1, I think this is just legacy we haven&#39;t gotten around to cleaning up.<br></blockquote><br>cc&#39;ing Andy, who can confirm whether the distinction is still necessary.<br></blockquote><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Yes! The most efficient runtime call is already inferred from the object type. So there is no efficiency advantage in using one entry point over the other. I think I left both in place because they were already public API. But I think the “NonObjC” entry point should be removed and documented wherever we document API changes. Maybe CHANGLELOG.md.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"><span style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;float:none;display:inline!important">Side note: internally we have a Builtin.isUnique_native that force casts Any object to Builtin.NativeObject in order to bypass the ObjC check for unknown types. It’s only useful for ObjC bridged types and we do not expose this through a public API.</span><br style="font-family:Helvetica;font-size:12px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px"></div></blockquote><div><br></div></span>Okay, great!</div></div><div><br></div><div>I can have a stab at this next week, when I’m back at my regular computer. Unless someone else feels like doing it before that, which is fine too =).</div><div></div></div></blockquote></div><div class="gmail_extra"><br></div></span>Just wanted to point out that like every API change, this needs to be proposed on swift-evolution.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Dmitri<span class="HOEnZb"><font color="#888888"><br clear="all"><div><br></div>-- <br><div>main(i,j){for(i=2;;i++){for(j=2;j&lt;i;j++){if(!(i%j)){j=0;break;}}if<br>(j){printf(&quot;%d\n&quot;,i);}}} /*Dmitri Gribenko &lt;<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>&gt;*/</div>
</font></span></div></div><span class="HOEnZb"><font color="#888888">
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=KlmFWKNIEcyPEGx2Wqruu-2FaM6I0anrxIOlKS1pgqec7Ol-2BgNrO8nd9Xmf0MQ2obz3k8Cq7aBCq7W7SW-2FmZDRjUzzTeqwRjsy0htUpuqEkau-2F3jZRDY91JR8B9oY-2Ffk0IVYUmcGU4C9hMNyRLDfLF9ChxXcSTGn316AUjgtlx2L7-2F0vcDdeW8oW0fD3e2ifnsibnAT0XsNEI4xqplB6JZtixjoJzg-2BQudjGynm9yl3sA-3D" alt="" style="min-height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important" height="1" border="0" width="1">
</font></span><br>_______________________________________________<br>
swift-evolution mailing list<br>
<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a><br>
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br>
<br></blockquote></div><br></div>