37 ms·
In JS I do my own (runtime) checks. People make fun of me and call it poor mans type checker. But I actually think I'm better then a typechecker to give nice e
by z3t4 8y ago
In JS I do my own (runtime) checks. People make fun of me and call it poor mans type checker. But I actually think I'm better then a typechecker to give nice error messages and know where more regious checks are needed.
When you already do tests and defensive programming, static typing adds very little, it just gets in the way. Requiring others to skim through the code they are calling in order to understand it i think is a feature of dynamic languages. The better you understand the code the fewer errors you will make.