

Ask HN: why do people seem to hate ; that much? - magice

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?
======
TheIrishman
There are two reasons for avoiding semis in JS, and similar languages, to wit:

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

------
brudgers
_"They_ [semicolons] _are transvestite hermaphrodites representing absolutely
nothing. All they do is show you've been to college."_ \--- Kurt Vonnegut.

~~~
dannytatom
I don't get it, can someone explain what this is supposed to mean?

~~~
rprospero
Vonnegut was speaking with regards to the English language. He was arguing
that semi-colon in written sentences serve no function beyond pretension.

------
AznHisoka
I love it when it's optional like in Ruby. If I accidentally put it in, it's
cool.

~~~
Sarkar
I know what you mean - same in JS. It was a little unnerving for me to write
code in JS without semi colons after every line.

It 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.

------
marssaxman
The semicolon signifies C syntax, and C syntax signifies arcane, low-level
danger. Designing a syntax without semicolons is a way to show that a language
is not trying to play in the same space as C.

~~~
debacle
The semicolon is used by Perl, PHP, JavaScript, Java, and C#.

None of those are what I would consider 'low-level' languages.

You can write arcane code in any language.

------
yashchandra
I actually love the semicolon when coding whichever language/script allows me
to do.I do not mind it at all.

------
factorialboy
The strongest argument against the semi-colon is readability.

#confession Out of habit, I still use it in most of my code.

