3 ms·
> impossibility to put an opening curly brace on its own line I sincerely wish all languages with braces would have this feature! Even Javascript devs practica
by nnq 9y ago
> impossibility to put an opening curly brace on its own line
I sincerely wish all languages with braces would have this feature! Even Javascript devs practically standardized in always putting braces at the end of the line. I prefer working with code that mixes tabs and spaces than with the old-ancient style of spoiling a nice and clean empty line with a brace (yeah, you can just leave a line empty if you want your code to look nicer and more separated).
Thank God I can do a lot of my work in Python and don't have to care about these things though. Would've been great if Go too borrowed the "indentation for code structure" amazing idea from Python ;)
I mean, really, even Lisps never put their parens at the beginning of otherwise empty lines...
- tqkxzugoaupvwqr 9y agoThat Go uses curly braces instead of significant whitespace was a conscious decision. I think it was Rob Pike who talked about how he got bitten by a subtle bug in Python due to overlooked incorrect indentation. Curly braces also make it easier to paste code into the correct scope.