Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It just makes the code slightly easier to read. The semicolon is just noise.


Semicolons aren't noise; you've read the statement before you even get to them so how can they be noise? Noise would be type info added to languages that didn't have it before, such as TypeScript. Generics can get pretty gnarley too, when you have nested typing info involved.


Noise as in new line already terminates. That’s one reason Python and Ruby code are cleaner to read.


I disagree that the semicolon is noise Thought the Javascript interpretter (usually) does not need it the semicolon is good for humans who read the code after you Sure it is possible to read the code without the semicolons with some practice but the semicolons are standard in many other related languages among them Java C++ PHP and MySQL Now you personally might not use those other languages very often but many of us especially those who occasionally wear a devops hat do And if the code is not meant to be read by humans also then why are we not writing in assembly




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: