[Haskell] pros and cons of static typing and side effects ?

Ketil Malde ketil+haskell at ii.uib.no
Thu Aug 11 02:18:10 EDT 2005


mt <mtvo at info.fundp.ac.be> writes:

>           http://paulgraham.com/lispfaq1.html

> [Most hackers I know have been disappointed by the ML family. Languages with 
> static typing would be more suitable if programs were something you thought 
> of in advance, and then merely translated into code. But that's not how 
> programs get written.

I disagree.  Static typing in essence gives you a lot of small unit
tests for free.  When refactoring code, these tests are often
sufficient to ensure that the refactored code works.  (Other types of
errors are usually weeded out in the unfactored code, and not
introduced by refactoring)

Static typing also gives you the flexibility to juggle compositions of
higher order functions; I almost always commit type errors when
constructing a largish expression, but when the type errors are weeded
out, more often than not the expression works as expected.

All IME, of course.

-k
-- 
If I haven't seen further, it is by standing in the footprints of giants



More information about the Haskell mailing list