<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="">That’s true, we are discussing a rather subjective point here. At the end of the day, it will probably come down to personal preferences of the core team members.<div class=""><br class=""></div><div class="">I haven’t yet seen a good argument against the ‘redundancy’ point I (and a couple of others) have made, but then again what others consider a ‘good’ argument seems to differ. Perhaps the best argument is that the redundancy is worth it for other reasons (easier to spot scoping errors?).</div><div class=""><br class=""></div><div class="">Regarding tabs vs. spaces, I was only kidding around really. The (!) was meant to indicate that, sorry for not being clear! I’ve done a fair amount of Python, but actually come from more of a C/C# background. My personal preference is tabs, but wouldn’t like to claim the same of the community. We don’t want to start up the war here, like you say.</div><div class=""><br class=""></div><div class="">I’ll be honest, I do like that Swift requires braces for single-line statements. It introduces a level of consistency that makes me reasonably happy (given that I have to tolerate braces anyway).</div><div class=""><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On 20 Dec 2015, at 20:37, Michael Buckley <<a href="mailto:michael@buckleyisms.com" class="">michael@buckleyisms.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><br class=""><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sun, Dec 20, 2015 at 11:46 AM, Alexander Regueiro <span dir="ltr" class=""><<a href="mailto:alexreg@gmail.com" target="_blank" class="">alexreg@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Thanks for sharing your thoughts. I hear what you’re saying, but not sure any of these points are substantial enough to outweigh the benefits.<br class=""></blockquote><div class=""><br class=""></div><div class="">And I think this is one of the most difficult aspects of discussing languages on this list. We're both looking at the issues from our own points of view, which are informed by our experiences, and neither of us can't rightly say, "your experience is invalid". The truth of the matter is, we lack any empiric evidence on which to base our decisions. Do braces hinder readability? You might say yes, I would say no. Again, we disagree, but without a large-scale analysis of these types of bugs in languages with braces vs. those without, we have nothing but our own experiences to go on, and our experiences may not be representative of the programming community at large.</div><div class=""><br class=""></div><div class="">That's a long-winded way of saying that, while you may not think any of these points are substantial enough to outweigh the benefits, I don't see any benefits to be outweighed. I'm receptive to the argument that redundant and unnecessary features should be removed from the language, but from my point of view, braces provide value with no downsides.</div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I think the best and simplest solution for this is just to force tabs to be used for semantic indentation, and disallow spaces. I believe F# does this (and also allows optional spaces which are ignored) – though that could have changed since I last used it.</blockquote><div class=""><br class=""></div><div class="">Golang did something similar a while back. The go-fmt tool indents everything with tabs. There was some grumbling about this, but my impression was people got over it. </div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Is this really as big a problem as you make it out? Personally, as a programmer, I *like* being constrained in these ways. If there’s only one way to do something correctly, it saves me a potential headache. Also, I thought tabs had won the war(!)</blockquote><div class=""><br class=""></div><div class="">It's a very, very large distraction. Programmers love to bikeshed. I get more than enough email on this list, and I shudder to think of the flood that would occur if the tabs-spaces war began in here. The war is not over. Just google tabs vs spaces and you'll still find that people are writing arguments about this in 2015.</div><div class=""><br class=""></div><div class="">For reference, everything I have seen has indicated that spaces are more popular. PEP-8 even calls out spaces as the preferred indentation method in Python, so I found it interesting that, coming from a Python background, you thought tabs had won the war. It goes to show that, despite PEP-8, the Python community is still not unified on tabs or spaces.</div><div class=""><br class=""></div><div class=""><a href="http://legacy.python.org/dev/peps/pep-0008/#tabs-or-spaces" class="">http://legacy.python.org/dev/peps/pep-0008/#tabs-or-spaces</a><br class=""></div><div class=""><br class=""></div><div class="">Two years ago, spaces were used three times more in Java projects on Github.</div><div class=""><br class=""></div><div class=""><a href="http://haacked.com/archive/2013/09/17/popular-code-conventions-on-github.aspx/" class="">http://haacked.com/archive/2013/09/17/popular-code-conventions-on-github.aspx/</a><br class=""></div><div class=""><br class=""></div><div class=""> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">This is not a significant issue for me. We can’t help other software being stupid (or other languages having small deficiencies). I don’t think it crops up enough anyway.</blockquote><div class=""><br class=""></div><div class="">This is a great example of my point about our different experiences. This crops up often for me, but not often for you. Who knows how big a problem this really is? Not I! </div><div class=""><br class=""></div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span class="">
> Additionally, I have heard tell that one of the original inspirations for Python's significant whitespace code were C bugs caused by programmers who omitted braces and relied on indentation for if statements. In other words, code like the goto fail bug. Swift already takes care of this by making the curly braces mandatory in if statements, so Swift code will not fall victim to the class of bugs that inspired significant whitespace.<br class="">
<br class="">
</span>I think that if you know from the outset that whitespace is semantic in a given language, such bugs are no more likely than mismatched brace problems.</blockquote><div class=""><br class=""></div><div class="">No more likely, I agree, but my point is these bugs are more catastrophic in significant indentation languages. The entire reason why swift requires braces for even single-line statements is to avoid the kinds of bugs that caused the goto fail issue.</div><div class=""> </div><div class=""><br class=""></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">This has never personally happened to me in all my Python coding… though related issues like forgetting to indent are caught by the Python compiler, since empty blocks are not allowed (there’s the `pass` statement of course). It’s well worth my Python code being more readable and prettier, in any case.<br class=""></blockquote><div class=""><br class=""></div><div class="">And again, different experiences. This has happened to me a couple of times over the years.</div></div></div></div>
</div></blockquote></div><br class=""></div></div></body></html>