[Haskell-cafe] Haskell and the Software design process

Don Stewart dons at galois.com
Sun May 2 17:21:29 EDT 2010


brad.larsen:
> On Sun, May 2, 2010 at 4:10 PM, Don Stewart <dons at galois.com> wrote:
> > I don't believe anyone has written a "Programming Haskell in the Large"
> > book (or any other similar functional language??), but there is lots of
> > experience in this community working on big, long lived code bases.
> >
> > Some key points:
> [...]
> >    * picking a good data type (like a zipper) will make hundreds of
> >          unit tests meaningless -- improving productivity.
> 
> Don,
> 
> What sort of tests were you thinking of that a zipper would render
> pointless?  Could you elaborate?
> 

Well, specifically, zippers statically ensure that you always have a
valid index into a set. No need for  arr ! 10 out of bounds checks, when
the type guarantees that indexing can never be out of bounds.

Clever types move invariants from dynamic properties to ones the
compiler can prove, saving you effort.

-- Don


More information about the Haskell-Cafe mailing list