Ask HN: why do people seem to hate ; that much?
This question has bugged me since the first line of Javascript. Seriously, what is wrong with ; (semicolon)? It is small and enabling. Why do new languages (including functional ones like Scala) keep advertise if their lack of requirement?
11 comments
[ 1.6 ms ] story [ 44.4 ms ] threadIt gets to the point where sometimes I'll chat on facebook and after finishing a thought I'll type ';' at the end of a sentence. Weird, I know.
None of those are what I would consider 'low-level' languages.
You can write arcane code in any language.
#confession Out of habit, I still use it in most of my code.
1) Code clarity. Semis do not aid legibility. All they add is sad little bits of fluff that get in the way of your eyes reading the code
2) Symbol overloading. Some us (Yes I am one) do NOT like symbols being overloaded. I esp. hate the way both semi and comma are overloaded in C, Java, etc.
The result is that inside of a for definition (that is the bit in brackets after the word 'for') semis and commas almost reverse their meanings. I just find that so retarded. So, in JS I never use semis EXCEPT where they are required.
Note, that by doing this when you do come across a semi in my code, you DO notice it. Again, improves code clarity.
Cheers
TheIrishman