<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="">Interesting discussion. Thank you for the points, Charles and Andrey, in particular. I too consider braces to be “redundant noise” in the same way semicolons are for single-line statements, among other syntactical features. Indeed, it feels like I’m stating myself twice whenever I write them.<div class=""><br class=""></div><div class="">There have also been a few votes against removing braces, but these seem to be reactionary. Could any of you perhaps clarify why you want to keep them, or is it just the “change is bad” stance?</div><div class=""><br class=""></div><div class="">Thanks.</div><div class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 20 Dec 2015, at 15:52, Dennis Lysenko &lt;<a href="mailto:dennis.s.lysenko@gmail.com" class="">dennis.s.lysenko@gmail.com</a>&gt; wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Contrived example Charles. Apple's tutorials consistently put braces on the line of the statement declaration.&nbsp;<a href="https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/ControlFlow.html#//apple_ref/doc/uid/TP40014097-CH9-ID120" class="">https://developer.apple.com/library/ios/documentation/Swift/Conceptual/Swift_Programming_Language/ControlFlow.html#//apple_ref/doc/uid/TP40014097-CH9-ID120</a><div class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="">On Sun, Dec 20, 2015 at 7:16 AM Charles Constant via swift-evolution &lt;<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>&gt; wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class=""><div class="">Andrey's post encourages me to veer into the merits of significant whitespace vs braces. This is probably unwise of me, since we're not all going to agree any time soon, but I can't resist pointing out an example:</div><div class=""><br class=""></div><div class="">////////////////////////////////////////////////////////////////////////<br class=""></div><div class=""><br class=""></div><div class=""><div class="">var foo: Int&nbsp;</div><div class="">{</div><div class="">&nbsp; &nbsp; get&nbsp;</div><div class="">&nbsp; &nbsp; {&nbsp;</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; return _foo</div><div class="">&nbsp; &nbsp; }</div><div class="">&nbsp; &nbsp; set&nbsp;</div><div class="">&nbsp; &nbsp; {</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; _foo = newValue</div><div class="">&nbsp; &nbsp; }</div><div class="">}</div><div class=""><br class=""></div></div><div class=""><div class=""><div class="">////////////////////////////////////////////////////////////////////////<br class=""></div></div></div><div class=""><br class=""></div><div class=""><div class="">var foo: Int:</div><div class="">&nbsp; &nbsp; get:&nbsp;</div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; return _foo</div><div class="">&nbsp; &nbsp; set:<br class=""></div><div class="">&nbsp; &nbsp; &nbsp; &nbsp; _foo = newValue</div><div class=""><br class=""></div></div><div class=""><div class="">////////////////////////////////////////////////////////////////////////<br class=""></div></div><div class=""><br class=""></div><div class="">It's obvious no programmer is going to be consistent about braces in the first example - it's absurdly verbose. So with braces in Swift, pretty much everything you write carries the overhead of "what inconsistent way will i format the braces for this code?" For me, I'd rather throw out the (largely redundant) noise, and stick with just the content.</div><div class=""><br class=""></div><div class=""><br class=""></div><div class="">&nbsp;</div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote"></div></div><div class="gmail_extra"><div class="gmail_quote">On Sun, Dec 20, 2015 at 3:59 AM, Andrey Tarantsov 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=""></div></div><div class="gmail_extra"><div class="gmail_quote"><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=""><span class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="">I don't know many people who have experienced a large variety (8+?) of programming languages and prefer Python's forced indentation</div></div></div></blockquote><div class=""><br class=""></div></span><div class="">Count me as one. I'd prefer Swift to have Python-style indentation, just on the grounds of braces being stupid (why would you want to enter the same scope information <i class="">twice</i>)?</div><div class=""><br class=""></div><div class="">So +1 from me, although I don't suffer from the braces at all.</div><div class=""><br class=""></div><div class="">I do want to point out that the amount of code that fits on a screen <b class="">is</b><i class=""> </i>fairly important, and you should keep your methods short, so one less brace per method means a couple more methods per screen.</div><div class=""><br class=""></div><div class="">This would also free up braces to mean “closure” in 100% of cases, which is good for consistency.</div><div class=""><br class=""></div><div class="">But it would introduce it's share of problems for sure, so I don't feel strongly about this proposal.</div><div class=""><br class=""></div><div class="">I also admit that braces are generally preferred, for some mysterious reason that I hope a believer can articulate here. Take Sass, for example; it has both an indentation-based syntax and a braces-based syntax, and the latter one seems way more popular.</div><div class=""><br class=""></div><div class="">A.</div><div class=""><br class=""></div></div>
</div></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><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=""><img src="https://u2002410.ct.sendgrid.net/wf/open?upn=l3fs1g-2F466j3y5fD5Q61KddsTTCmXL0uxw3XoAMFFNjs1zLdXswAEplDZrmAtIc0LqzCipvOLyzgkbwiVVjPWAdARS5Nq9xO-2FuLvouA90AbYrN5ZDG2be7eORfL9ScUgPSW5c3ynPZAMgKyql9niOLwkBMEyIhl-2B4Xn6C0QoY6v-2FgQ1t4hKfKjA19n9FBktkRj5M6fzABGCxjAvSake1mJe1ziPkbzqcUKwMOL2bwSE-3D" alt="" width="1" height="1" border="0" style="min-height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important; display: none !important;" class="">
</div></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br class="">_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
<br class=""></blockquote></div></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"></blockquote></div><br class=""></div>
<img src="https://u2002410.ct.sendgrid.net/wf/open?upn=8CZIdLciSFC-2BO5jF-2FiP8qN7dBFsgCUZ50wdTsolcRPfPjhhwehHJew6uTsbXuReOv0B5E5dyHXBwowgKaf109pOdzENp4Pz81iXM-2BmOYWG2itGRa2DPL0uY78P7OeFUTmLkLG8GkQy2cWKiBBz8hOfeczYuFL84hw8vkUZ-2BtC-2B8JO-2FYaZpX2YpkcPIi8R6jQUrRpThAdg8SdxDBokbQ41rIgEASylC-2BPA9ez-2FTE784s-3D" alt="" width="1" height="1" border="0" style="min-height: 1px !important; width: 1px !important; border-width: 0px !important; margin: 0px !important; padding: 0px !important; display: none !important;" class="">
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</blockquote></div></div></div>
</div></blockquote></div><br class=""></div></div></body></html>