<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class="">On Dec 21, 2015, at 11:19 AM, Jordan Rose via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><div class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 21, 2015, at 10:27 , Joe Groff &lt;<a href="mailto:jgroff@apple.com" class="">jgroff@apple.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html charset=us-ascii" class=""><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div class=""><blockquote type="cite" class=""><div class="">On Dec 19, 2015, at 7:12 PM, Dmitri Gribenko via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_extra"><div class="gmail_quote">On Sat, Dec 19, 2015 at 7:06 PM, Jordan Rose via swift-evolution <span dir="ltr" class="">&lt;<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>&gt;</span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class=""><div class="">-1 to using '&amp;' in the declaration; it's a sigil that doesn't mean anything as is. (I was originally on the side of using 'inout' at the call site as well, i.e. "swap(inout x, inout y)", but it was considered too verbose.)</div></div></blockquote><div class=""><br class=""></div><div class="">I'd actually suggest that we reconsider this. &nbsp;'&amp;' at the callsite has deep associations with C semantics, and I have too frequently seen buggy code using '&amp;x' combined with one of the C interop implicit conversions to "get a pointer" that the code stores in a variable somewhere.&nbsp; It is also hard to explain to people that '&amp;x' does not do what they want in that case, "&amp; means address-of, and it returns a pointer here, what do you mean I can't use it?"</div></div></div></div></div></blockquote><br class=""></div><div class="">Using `inout` at the call site seems reasonable to me. I'd bet the vast majority of `inout` parameters are really the implicit `self` of mutating methods, which already get a pass, so aside from `swap` I wonder how often `&amp;` is in practice.</div></div></div></blockquote><br class=""></div><div class="">One downside is that we <i class="">do</i>&nbsp;use '&amp;' for things other than inout: pointers. If/when we do have a notion of "pass the stable address of this thing", 'inout' is not necessarily the most appropriate way to mark it.</div></div></div></blockquote><div><br class=""></div>This is the only concern I have with the current consensus. &nbsp;We could just re-introduce &amp; as an ordinary unary “assignment” operator, maybe.</div><div><br class=""></div><div>John.</div></body></html>