Gregory Collins <g...@gregorycollins.net> writes: >> Henning Thielemann <lemm...@henning-thielemann.de> writes:
>>>> http://www.haskell.org/ghc/docs/6.12.2/html/libraries/base-4.2.0.1/Control-Exception.html#v%3Athrow >>> I see. This should be forbidden, at all! :-) >> Why is this worse than or different from 'error'? To me it looks like >> 'error', only with a non-string parameter. > Calling 'error' is just as bad IMO! Which is the same as 'as good'? I think error is legitimate in many cases. For instance: * when you know a branch will never be taken, you can add an 'error "this will never happen"' which both informs other readers of the code of the intended usage, and provides a greppable message if you were wrong. * for stub functions during development ('undefined' doesn't tell you which undefined value you tried to evaluate) * Functions like division, which is still useful, even if it is partial. -k -- If I haven't seen further, it is by standing in the footprints of giants _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe