On 2008 Aug 24, at 7:16, C.M.Brown wrote:
OK, so you're basically saying that segfaults can be eliminated with a
strong type system, whereas pattern matching errors is the result of
some
Not really, no. A sufficiently strong type system will eliminate
segfaults (modulo bugs in the language runtime or erroneous use of the
FFI); but Haskell arguably doesn't have a sufficiently strong type
system: pattern match errors being the symptom, and the resolution is
dependent types.
That said, what I was really saying was that a pattern match error
still gives you more information, and more easily, than a segfault:
if it's not something trivial like dereferencing a null pointer, the
segfault may well be in completely unrelated code because the
erroneous operation (for example) overran a buffer and corrupted
unrelated data. Whereas with laziness, you may have to do some
footwork to find the actual error (ghci's debugger helps, as does hpc
as someone else mentioned upthread) but it's deterministic.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university KF8NH
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe