3 ms·
https://javascriptwtf.com/ https://javascriptwtf.com/ Arguably this is worse than C++ because for basic things/beginner to intermediate users, the footguns in
by eqvinox 2y ago
https://javascriptwtf.com/ https://javascriptwtf.com/
Arguably this is worse than C++ because for basic things/beginner to intermediate users, the footguns in C++ are more benign (e.g. performance related, rather than correctness) than the ones in JavaScript.
- orphea 2y ago> the footguns in C++ are more benign I don't think I can agree. https://pvs-studio.com/en/blog/posts/cpp/1215/ https://pvs-studio.com/en/blog/posts/cpp/1215/
- eqvinox 2y agoI'm not gonna claim C++ is a great language, just that JavaScript starts its weirdness "earlier"/"lower" than C++. Especially since a bunch of the issues listed on your linked reference are technically UB but compilers (a) can warn about it, and (b) have reigned back somewhat on exploiting UB for optimizations. Now that I think about it, the fact that you necessarily have to use a compiler with C++ is also part of the equation here. It's basically a mandatory linter. With JavaScript as with any interpreted language there's a lot of mines you can trip over waaaaaay down the line, especially if you aren't taking steps to use linters.
- hyperhello 2y agoThe same tired edge cases. Especially the null pointers. Yes, but what did you want the language to do? Stop you? You can do that yourself.
- eqvinox 2y agoHonestly? I want the language to add integers. I don't understand how anyone can take seriously a language that only has floats for numbers. It's straight up ridiculous.