4 ms·
Static types help with early agility. I don't have to get everything right at the outset, because I can change my code and know what I broke. That's possible
by dllthomas 12y ago
Static types help with early agility. I don't have to get everything right at the outset, because I can change my code and know what I broke. That's possible in a code base that can't be statically type checked if you pin things down with sufficient tests... but the tests don't rewrite themselves when I make a change to the code - the types do (at least, when working in a decent language).
Note that I'm not at all saying that every statically typed language is superior to every dynamically typed language. Many - particularly older, popular, and oversold statically typed languages - asked for a lot of boiler plate in exchange for not terribly valuable guarantees.
- tosh 12y agoI think we are in agreement but have different things in mind when we use the word agile in this case (which is not surprising). What I meant was the ability to write new code and see if some functionality of the product 'works' before I have to satisfy the type checker. In statically typed languages I have to satisfy the type checker before I can run the code, that is a barrier. Regarding refactoring good tooling supported by type annotations are definitely helpful. I guess what I'm trying to say is that we have languages now that give us the best of both worlds, no more need to pick either extreme of the spectrum or use a dynamically typed language in the beginning and to rewrite everything again in another language later.
- dllthomas 12y agoI appreciate the charity, but I think we do actually have a disagreement. Let's go too far, and define "agility" to be "things that make me faster in the first 5 minutes working on a problem." I am saying that when I am writing Python in that context, Haskell's type system is something I find conspicuously missing.