3 ms·
> 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/
by 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.