[Haskell-cafe] Haskell Propeganda
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Sun Aug 24 11:52:21 EDT 2008
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] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
More information about the Haskell-Cafe
mailing list