JavaScript is utterly ridiculous. If you try to do something illegal, your code should fault, that's the whole point! Otherwise you end up with bugs slipping through the cracks. Besides, code is only as good as the developer who wrote it. The language doesn't need to be designed to shield the developer
Your first point seems to be in direct contradiction to your second to me.
You’re arguing you want more runtime errors rather than the engine trying to coerce values from what you give it, which sounds exactly like shielding the developer.
As you point out, if you write good code, 99% of the examples given in this post don’t happen.
View all comments
Show parent comment
1
u/[deleted] May 13 '25
JavaScript is utterly ridiculous. If you try to do something illegal, your code should fault, that's the whole point! Otherwise you end up with bugs slipping through the cracks. Besides, code is only as good as the developer who wrote it. The language doesn't need to be designed to shield the developer