<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 27, 2017 at 8:03 PM, Chris Lattner 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"><span class="">On Nov 27, 2017, at 8:57 AM, Mathew Huusko V &lt;<a href="mailto:mhuusko5@gmail.com">mhuusko5@gmail.com</a>&gt; wrote:<br>
&gt; You&#39;re saying that there is universally no inherent difference, and that all calls &quot;determine if you have called it&quot; correctly, but then picked one of only a handful of cases in current practice where that is actually true. Yes &quot;+&quot; (/other math operators) and array access are unsafe, but most other things in Swift are safe by default, and you have to opt into un-safety (e.g. forcing or checking an optional or throwing call) — this is a main tenant of the language.<br>
<br>
</span>There is nothing unsafe about this proposal.  It is fully type safe and supports failable operations (by having the properties typed as optionals).  This is shows by example in the proposal.<br>
<br>
Your explanation above is so confusing to me.  The closest analog to this feature is AnyObject dynamic lookup, which *is* completely unsafe, and is pervasively tangled throughout the compiler.   Maybe you’re confusing the two.<br></blockquote><div><br></div><div><br></div><div>I&#39;ve seen people in this thread mention AnyObject dynamic lookup as something similar to the proposal. But there&#39;s something i don&#39;t understand : <br></div><div>var a: AnyObject</div><div>a.anyFunc()</div><div><br></div><div>is a compiler error.</div><div><br></div><div>Whereas</div><div>var a: PyObject (or anything conforming to DynamicLookup depending on the option from the proposal)<br></div><div>a.anyFunc()</div><div><br></div><div>would be perfectly fine. What&#39;s the part i didn&#39;t get ?<br></div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
-Chris<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<wbr>_________________<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/<wbr>mailman/listinfo/swift-<wbr>evolution</a><br>
</div></div></blockquote></div><br></div></div>