Hacker News new | ask | show | jobs
by the_af 2150 days ago
On that note, I've heard many times dynamic typing advocates say (or write) "I've seldom wrote a bug that was a type error".

But a lot of the time, their language is simply unable to encode certain properties as types, so by definition they don't think of some classes of bugs they do write as "type errors". Maybe in a statically typed languages they would have been type errors indeed!

It's as if the tool you use sometimes reinforces your blind spots: "you don't know what you don't know".

PS: anecdote is probably irrelevant, but I've written plenty of dumb type errors with Python. Things that would have been caught by a test or an external tool, sure, or the type checker of a statically typed language could have caught for me for free, leaving the more relevant logic tests to me. I tend to write type errors left and right. Maybe I'm simply not a good Python programmer, of course!