Re:Why the world needs Haskell
by wereHamster on Tuesday July 09, 2013 @11:55PM
(#6017361)
> Additionally, as a matter of culture, Haskell programmers rarely throw exceptions.
The writers of unix and other base libraries would disagree. See for example `head`. Or most functions that calls into C where the C function fails with an error. In that case Haskell blows up into your face, and you have to wrap the function invocation in a catch.
Re:Why the world needs Haskell
by mercurial on Wednesday July 10, 2013 @11:16AM
(#6020274)
Pattern matching is great, you can usually use it instead of head, but you want something like Control.Error.Safe.tryRead to replace other unsafe functions like read.
The writers of unix and other base libraries would disagree. See for example `head`. Or most functions that calls into C where the C function fails with an error. In that case Haskell blows up into your face, and you have to wrap the function invocation in a catch.