3 ms·
If you're still getting stuck up on semantic whitespace in 2015, you must not use any of: + Python + Haskell + Javascript + Go + Ruby + Bash Anything else I'm
by duaneb 11y ago
If you're still getting stuck up on semantic whitespace in 2015, you must not use any of:
+ Python
+ Haskell
+ Javascript
+ Go
+ Ruby
+ Bash
Anything else I'm missing? Whitespace is useful. Figure out how to view it in your editor and move on already. This is so far beyond bike-shedding it's just a depressing comment on how much programmers obsess on syntax.
- nostrademons 11y agoSwift, where semicolons are optional unless you have multiple statements on the same line. Also C++, C99, and Java if you count // comments.
- jason_s 11y ago? How does Javascript use semantic whitespace?
- omaranto 11y agoI'm not sure of the details but surely the answer involves semi-colon insertion.
- Turing_Machine 11y agoThat's the only one I'm aware of. Put me in the "if that makes a difference in your code, you're doing it wrong" camp (and yes, I recognize that not everyone agrees, and that argument has already been had too many times).
- jason_s 11y ago.kniht uoy naht tnatropmi erom s'ti spahrep os ytilibadaer stcapmi xatnyS
- J_Darnley 11y agoGod no. Most of those hold no value or any interest for me. Bash only because it is the default shell. And thanks for pointing out why I should avoid the others. Have you never looked at a diff? Massive whitespace changes hide real changes. Next someone will say "Git has a -w option". To which I say "A diff without whitespace changes in those languages would be useless". I can't test it, apply it, or otherwise use it without re-indenting the source myself.
- SamReidHughes 11y agoLine endings are a different question than indentation. Language design decisions do matter. "Figure out how to view it in your editor" doesn't do one lick to address the problems of semantic indentation.