[Haskell-cafe] Re: How does one get off haskell?
cam at uptoisomorphism.net
Fri Jun 18 10:30:14 EDT 2010
On Fri, Jun 18, 2010 at 8:37 AM, Daniel Fischer
<daniel.is.fischer at web.de> wrote:
>> Haven't you heard? Enough unit tests give you almost the same security
>> as a good static type system at the expense of more code!
>> Uh, wait, why is that an advantage again? :p
> Duh, because it's much faster to develop in a dynamically typed language.
> Writing out all those type signatures costs time. Much more time than
> writing a few dozen unit tests per function, right?
That's... not really fair. A static type system DOES impose
limitations, and arguing with the compiler about whether some code is
acceptable does take time. Even a handful of simple unit tests will
catch the majority of possible errors, and things that require deep
metaprogramming wizardry in Haskell can be stupidly trivial in
something like Ruby. If writing something in Haskell would mean ten
lines of metaprogramming and type signatures for every single line of
code, but a few unit tests and some quick-and-dirty Python would
provide acceptable results, I'd go with the latter.
The better question is "when do the benefits of static typing outweigh
the costs imposed?". If you're using Java, the answer is probably
"never", but even in Haskell I don't think the answer is quite
More information about the Haskell-Cafe