Earlier quoted context omitted.
This was on HN the other day: https://github.com/hwayne/awesome-cold-showers#static-vs-dyn... . I would probably add a caveat to the listed caveats that testing might not be considered? Like if every dynamically typed code base implements an ad-hoc typechecker with a testing framework, it's a distinction without a difference.
I’ve passed wrong type of arguments to Python functions and assumed type of the return value wrong countless of times. That has never happened in Haskell. I don’t know how to reconcile my experience with the statement that there’s no evidence that strong typing reduces bugs.
- I'm very specific about when I use None
- I'm a big fan of named function arguments
- I like to think my naming of things is pretty good, as are my conventions for parameters
- I try to handle all possible cases (what I mean here is I do and if I don't I made a mistake)
I use tests very sparingly in personal projects, but yet I haven't really felt their absence. If I ever write a piece of particularly hairy code (metaprogramming comes to mind... lord) I'll write a quick script testing some cases and then delete it.
Anyway, all that is to say I think part of dynamic programming is you build an immune system for this stuff.