DEV Community

Discussion on: An Opinionated Article on SemiColons in JavaScript

Collapse
 
ericgeek profile image
EricGeek

This lines up with my stance fairly well, right down to "I don't have non-anecdotal data to support my position." I just mentally parse out JavaScript with semicolons faster than JavaScript without, regardless of the argument against being that it should be easier to mentally parse because it's fewer characters.

Ultimately, it comes down to how I semi-jokingly put it, the reason I prefer semicolon usage in JavaScript is because it makes the (non-literal) voices in my head happy. That's about as unscientific but realistic as you can get, but is also about as individual/personal as you can get as well.

I usually don't mind that some other people prefer avoiding optional semicolons, as if it's code I'm working on, I've got tools that will add them. The only time it bothers me is when I'm following along with the code in examples/demonstrations where the source isn't under my control.

Collapse
 
rfornal profile image
bob.ts

I would love to start tracking the code with and code without semicolons and see which is more or less prone to errors in the code.

My biggest problem has been code where it's intermixed. Where the standards are too loose. It becomes very hard to read then.