Probably not very often but you could have an issue if you use poor naming conventions and reuse of local variable names. If you mistype the variable identifier and don't notice, it's possible JavaScript's type coercion would make debugging a little more painful. All that said, it is kinda annoying to see posts about "omg you can do this thing that doesn't make any sense with JavaScript", like yeah we get it, JavaScript is weird.
Linters help but they're there to work around the weak parts of the language. Similar things are IDEs with good function name and argument order hinting for PHP. They do help you with PHP's inconsistent standard library function names and argument orders, but why is this a problem that exists in the first place? My opinion.
It's a problem because the initial versions of JS were so built-upon that changing the fundamentals of the language would result in enough backward-compatibility breaks to be undesirable. Languages which transpile to JavaScript are the current way of dealing with this, and in the future, languages will target WASM to allow for more ways of doing things.
That's fair enough, languages like Typescript do improve the experience significantly. I really hope WASM picks up, the potential to write any language in the frontend is really big after decades of little choice.
View all comments
Show parent comment
2
u/reed_foster Jun 21 '18
Probably not very often but you could have an issue if you use poor naming conventions and reuse of local variable names. If you mistype the variable identifier and don't notice, it's possible JavaScript's type coercion would make debugging a little more painful. All that said, it is kinda annoying to see posts about "omg you can do this thing that doesn't make any sense with JavaScript", like yeah we get it, JavaScript is weird.