haskell-cafe@haskell.org
[Top] [All Lists]

Re: [Haskell-cafe] Haskell and the Software design process

Subject: Re: [Haskell-cafe] Haskell and the Software design process
From: Don Stewart
Date: Sun, 2 May 2010 14:21:29 -0700
brad.larsen:
> On Sun, May 2, 2010 at 4:10 PM, Don Stewart <dons@xxxxxxxxxx> 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
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@xxxxxxxxxxx
http://www.haskell.org/mailman/listinfo/haskell-cafe

<Prev in Thread] Current Thread [Next in Thread>