by quickthrower2 · 3y ago · 0 comments
Achievable by just removing automatic type coercion. Throw errors instead.
Would need to be feature flagged for backwards compatiability.
I always thought JS needed static types to fix the insanity until I tried Python and realized that almost all the insane BS I get in JS are all runtime errors in Python.
There's a very good case to be made for reducing runtime errors, but it's a hell of a good start to at least have them!
Rather than what we have now, which is "assume the programmer is a beginner, who also never makes mistakes", and "given nonsensical commands, just do nonsense, and propagate garbage data throughout the entire program".