<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On 24 Mar 2016, at 14:18, Kurt Werle &lt;<a href="mailto:kurt@circlew.org" class="">kurt@circlew.org</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Coming from ruby, I'm quite fond of trailing closures.&nbsp; I couldn't really give you a concrete reason why - putting them in the ()'s really isn't that big a deal.&nbsp; But I'll say that I move them outside every single time...<div class=""><br class=""></div><div class="">I will say that your examples are the most trivial possible and that the more complex the closure (describing context variables and return types, throws, etc) the uglier it seem to me to put it inside parens.</div></div></div></blockquote></div><br class=""><div class="">Perhaps, but if you’re getting that onto a single line then it starts to look ugly regardless IMO, whereas splitting it across multiple lines isn’t really any different with or without being in the parenthesis, except that the closing parenthesis at least clarifies that it was a method you’re closing, for example:</div><div class=""><br class=""></div><div class=""><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>var modifier = true</font></div><div class=""><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>let foo = myArray.map({</font></div><div class=""><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>var result = $0</font></div><div class=""><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>if modifier { result = -result }</font></div><div class=""><font face="Monaco" class=""><br class=""></font></div><div class=""><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>modifier = !modifier</font></div><div class=""><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">                </span>return result</font></div><div class=""><font face="Monaco" class=""><span class="Apple-tab-span" style="white-space:pre">        </span>})</font></div><div class=""><br class=""></div><div class="">I dunno, I guess I’m just struggling to find cases in my own code where they really offer much of an advantage to justify having a distinctly different way of doing things, with the ambiguity and inconsistency that represents, which is why I’ve brought it up to discuss; i.e- do we use them just because they exist? Trivial aesthetic difference? Personal preference only?</div></body></html>