<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">On Dec 3, 2017, at 5:45 AM, Jonathan Hull &lt;<a href="mailto:jhull@gbis.com" class="">jhull@gbis.com</a>&gt; wrote:<div><blockquote type="cite" class=""><div class=""><div class="">Hi Chris,<br class=""><br class="">I am definitely in favor of providing dynamic features in Swift, and of being able to interoperate easily with dynamic languages. I really like the idea overall.<br class=""></div></div></blockquote><div><br class=""></div>Great!</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class=""><br class="">I was about to write up a different idea I had for partially mitigating some of the issues around being able to mistype method names, etc…, but then I remembered a usability principle that I first heard from members of the Lisa team (discovered the hard way): Things which behave the same should look the same, and things which behave differently need to look different.<br class=""></div></div></blockquote><div><br class=""></div><div>That’s a good principle. &nbsp;However, a dynamic member lookup is just a member lookup. &nbsp;By that principle, it should look like a member lookup :-)</div><div><br class=""></div><div>Further, I incorporated some of the conversation with Matthew into the proposal, showing how adding even a single sigil to dynamic member lookup to distinguish it is problematic:</div><div><a href="https://gist.github.com/lattner/b016e1cf86c43732c8d82f90e5ae5438#increasing-visibility-of-dynamic-member-lookups" class="">https://gist.github.com/lattner/b016e1cf86c43732c8d82f90e5ae5438#increasing-visibility-of-dynamic-member-lookups</a></div><div><br class=""></div><div>Further, adding something like .dynamic would completely undermind the proposal. &nbsp;You can already write:</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>x.get(“foo”).get(“bar”)</div><div><br class=""></div><div>having to write:</div><div><br class=""></div><div><span class="Apple-tab-span" style="white-space:pre">        </span>x.dynamic.foo.dynamic.bar</div><div><br class=""></div><div>has no point.</div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div class="">What this means is that it is easy to wrap commonly used calls in a normal swift method:<br class=""><br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>func addTrick(_ name:String) {<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span><span class="Apple-tab-span" style="white-space:pre">        </span>self.dynamic.add_trick(name)<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>}<br class=""></div></div></blockquote></div><br class=""><div class="">This would require wrapping all calls for them to be usable.</div><div class=""><br class=""></div><div class="">-Chris</div><div class=""><br class=""></div></body></html>