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?
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.
The thing is, if the semicolon is optional, you can't write more complex expression. For example, if you want to sum a bunch of numbers, you can't have the plus signs at the beginning of the lines anymore.
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.
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