[Haskell-cafe] introducing Maybe at managing level

John Lato jwlato at gmail.com
Fri Mar 29 06:47:10 CET 2013


In FP, I think this sort of problem is generally handled via algebraic data
types rather than exceptions.  In particular this directly addresses the
issue of "exceptions don't necessarily shout themselves out", since the
compiler warns you if you've missed a case.

They sound mathy, but algebraic data types are actually a pretty simple
concept.  I think the "Learn You a Haskell" explanation is decent:
http://learnyouahaskell.com/making-our-own-types-and-typeclasses

Provided I understand the context properly, actually using exceptions for
this sort of issue would be extremely rare practice.


On Fri, Mar 29, 2013 at 12:21 AM, luc taesch <luc.taesch at gmail.com> wrote:

> I was looking for some link introducing the way FP/ Haskell handles errors
> and Exceptions.
>
> This is for a non FP Guy, and ideally withought scaring them with Monads
> and category theory :-).
>
> for the background :
>
> the guy said : As I mentioned in another thread in banking (in particular)
> it is the exception processing that often dominates the functionality of a
> system - as the core concept is generally very straightforward. Developing
> for "exception handling" (not in a Java/C++ sense) is a tricky thing - as
> the exception don't necessarily shout themselves out - and are often why we
> have large misunderstood legacy systems which are hard to replace.
>
>
>
> ______________________________**_________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/**mailman/listinfo/haskell-cafe<http://www.haskell.org/mailman/listinfo/haskell-cafe>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130329/63705e9f/attachment.htm>


More information about the Haskell-Cafe mailing list