4 ms·
>Now people complain that it's a weakly typed language replacing strongly-typed languages they prefer Firstly, that's a strawman. I prefer strongly-typed dynam
by nanny 11y ago
>Now people complain that it's a weakly typed language replacing strongly-typed languages they prefer
Firstly, that's a strawman. I prefer strongly-typed dynamic languages and I still think JavaScript sucks.
Secondly, I think you're confusing strong vs. weak with dynamic vs. static. JavaScript's weak typing is unequivocally one of the worst things about the language.
- adrusi 11y agoI'm not Javascript's biggest fan, but the weak typing argument is a little... weak. You never run into problems with weak typing as long as you follow a few rules like using === over ==. Javascript is poorly designed because there are these rules you need to learn and because there are some language features that you just don't use. Some other reasons too, but the way people write it, Javascript may as well be strongly typed.
- nanny 11y ago>the weak typing argument is a little... weak. I think you contradict this in the rest of your comment: >Javascript is poorly designed because there are these rules you need to learn and because there are some language features that you just don't use. One rule you've mentioned: >using === over == Which is a result of weak typing. So maybe weak typing is a language feature "that you just don't use"? Which, according to you, makes weak typing a reason why JavaScript is poorly designed.
- adrusi 11y agoIt was not my intention to imply that javascript is not weakly typed. And I think we have collectively determined (correctly) that weak typing is a burden in a general-purpose language. So yes, your conclusion is correct, weak typing is "a reason" that javascript is poorly designed. But your claim wasn't "weak typing was a bad design decision", it was "JavaScript's weak typing is unequivocally one of the worst things about the language". I think it's silly to call a mis-feature "unequivocally one of the worst things" when people who write javascript basically never run into, and when it can be completely avoided by using unintrusive tooling like a linter.