[Haskell-cafe] Haskell Propeganda

Tim Docker timd at macquarie.com.au
Tue Aug 26 22:58:16 EDT 2008

David Roundy wrote:

> Which illustrates the point that it's not type safety 
> that protects us from segfaults, so much as bounds checking,
> and that's got a non-trivial runtime cost.  At least, most
> segfaults that *I've* caused (in C or C++) have been from
> overwriting the bounds of arrays, and that's precisely the problem
> that Haskell does *not* solve using its type system. 

That differs from my experience. Most segfaults that *I've* caused (in
C or C++) have been due to dereferencing null pointers. Type safety
does help you here, in that Maybe lets you distinguish the types of
things that are optionally present from those that must be. 


More information about the Haskell-Cafe mailing list