<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"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></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 <<a href="mailto:mhuusko5@gmail.com">mhuusko5@gmail.com</a>> wrote:<br>
> You're saying that there is universally no inherent difference, and that all calls "determine if you have called it" correctly, but then picked one of only a handful of cases in current practice where that is actually true. Yes "+" (/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've seen people in this thread mention AnyObject dynamic lookup as something similar to the proposal. But there's something i don'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's the part i didn'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>