3 ms·
My experience has taught me that if static typing improves your code, it's probably hiding deeper flaws. I won't deny there are some clever things one can do t
by xapata 10y ago
My experience has taught me that if static typing improves your code, it's probably hiding deeper flaws.
I won't deny there are some clever things one can do to improve code with sophisticated typing. However, the typical usage is to alleviate the mistakes of bad names and poor design. When I find type errors at runtime, I look for a way to refactor that avoids confusion without needing to add type checking. I don't always succeed, but when I do the code is more elegant.