|
|
|
|
|
by thebouv
4123 days ago
|
|
Good programmer, bad programmer. Good code, bad code. Let's not all pretend we don't have stupid bugs in our code regardless of editor, linting or language. JS is a mediocre language. It is popular because it is ubiquitous, not because it is good. It really does have bad error handling, weird optional rules, problems determining type when adding/concatenating with +, and the list goes on. His was a syntax error that could have been caught with linting, sure. But there is plenty of well-formed JS that passes linting but still behaves badly due to the language itself. |
|
When there are no semicolons between statements, it will automatically and silently insert them. Without this behavior his mistake would've been a compile-time error and easily caught. (Of course, this leads to the bigger bug that sometimes Javascript will insert them in the wrong place.)
He doesn't know exactly what the bug in Javascript is and how to point it out accurately, but he is absolutely correct that there is a bug in Javascript's design.