* On Thu, Feb 12 2009, chromatic wrote:
> It's trivial to write a type-safe Haskell program which does not violates
> mathematical laws tought to fifth graders and which never terminates.  I can
> do it in fewer than ten lines of code.

Wait, you need ten lines for this?  I would just say "print [1..]".  I
hear there are a lot of integers.

The real barriers to "provably correct software" that Haskell puts up
are functions that don't work over all values of a given type ("tail
[]"), and functions that have incomplete pattern matches.  (Cases that
"never happen" can happen.)

Fortunately this is easy to fix with static analysis, but it is possible
for your program to compile and start running with these errors, only to
die at an undetermined moment.  That's never fun -- so testing is needed
even in Haskell programs.

Regards,
Jonathan Rockway

--
print just => another => perl => hacker => if $,=$"

Reply via email to