<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=""><div class="">Hi</div><div class=""><br class=""></div><div class="">I’ve very much been teetering on my preference of having dynamic member lookup sites marked or not and have landed on the side of having it marked. This is for a few reasons:</div><div class=""><br class=""></div><div class="">1. There needs to be some way of conveying that this is not a ‘blessed’ way of writing things.</div><div class="">2. It’s a different paradigm and would benefit a reader by having that documented.</div><div class="">3. It’s weird that code completion, jump to and other code insights stop working for valid members. I’m not worried about having these insights not working though, just the inconsistency. Along with my mental model of my code not working with my tools meaning theres something wrong with my code.</div><div class=""><br class=""></div><div class="">The most minimal way of marking expressions in a way I could think of that would also remove anyones notion of "this code is fully supported static Swift code” would be to use the currently reserved ‘ (Single quote).</div><div class=""><br class=""></div><div class="">Using the code example from another conversation:</div><div class=""><br class=""></div><div class="">let np = Python.import("numpy")<br class="">let x = np.array([6, 7, 8])<br class="">let y = &nbsp;np.arange(24).reshape(2, 3, 4)<br class=""><span class="Apple-tab-span" style="white-space: pre;">        </span><br class="">let a = np.ones(3, dtype: np.int32)<br class="">let b = np.linspace(0, pi, 3)<br class="">let c = a+b<br class="">let d = np.exp(c)<br class="">print(d)</div><div class=""><br class=""></div><div class="">Would become:</div><div class=""><br class=""></div><div class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let np = Python.import("numpy")</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let x = 'np.array([6, 7, 8])'</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let y = 'np.arrange(24).reshape(2, 3, 4)'</div><div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let a = 'np.ones(3, dtype: np.int32)'</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let b = 'np.linespace(0, pi, 3)'</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let c = a+b</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let d = 'np.exp(c)’</div></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">print(d)</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">If that is still too heavy a single quote only at the beginning of the expression could be used:</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let np = Python.import("numpy")</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let x = 'np.array([6, 7, 8])</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let y = 'np.arrange(24).reshape(2, 3, 4)</div><div style="margin: 0px; font-stretch: normal; line-height: normal; min-height: 14px;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let a = 'np.ones(3, dtype: 'np.int32)</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let b = 'np.linespace(0, pi, 3)</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let c = a+b</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">let d = 'np.exp(c)</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">print(d)</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">I’m aware that Python is a dynamic language and would be fine with not having lookups marked if it were just dynamic language wrappers that this proposal affected. A way to get around this could be to use Option 2 of "Reducing Potential Abuse” in the proposal along with having non blessed types require markings or would that be too much of an inconsistency?</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><br class=""></div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">FWIW I really hope this proposal goes through, even if it were as is, just for the reason of getting Swift more people.&nbsp;</div><div style="margin: 0px; font-stretch: normal; line-height: normal;" class="">Another reason I have to wanting this dynamic feature to be more explicit is that I (like I suspect many others) have been burnt by dynamic features in the past and have run to Swift as a home away from it :)</div></div><div class=""><br class=""></div><br class=""><div class="">
<div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;">-Letanyan</div><div style="color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class=""><br class=""></div><br class="Apple-interchange-newline">
</div>
<br class=""></body></html>