Tim Chevalier wrote:
On 5/29/07, Andrew Coppin <[EMAIL PROTECTED]> wrote:
My point is for most programs, trying to figure out exactly what you
want the program to do is going to be much harder than implementing a
program that does it.

Writing a spec can help with figuring out what you want your program to do.

True in principle. But if writing the spec is harder than writing the actual program, all it means is you spend longer trying to figure out how to express intuitively simple concepts using advanced and very abstract and subtle predicate calculus.


Also, for most programs the spec is far more complicated (and hence
prone to error) than the actual program, so...

Really? That might be a good sign that there's something wrong with
the spec, the program, or your understanding of the problem. In
Haskell, the most common form of specification is probably type
signatures. Those are usually simpler than the corresponding
implementations.

One of the things I love about Haskell is the way the type signature alone "almost" tells you what the function actually does. I've never come across this in any other language - but then, I've never seen any other language with a type system as powerful as Haskell.

OTOH, how many function can you write with :: [Int] -> Int? I can think of a few...

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to