[Haskell-cafe] Errors in non-monadic code
Jerzy Karczmarczuk
jerzy.karczmarczuk at unicaen.fr
Tue Aug 20 00:25:44 CEST 2013
Le 20/08/2013 00:19, jabolopes at google.com a écrit :
> If I understand correctly, by "escaping continuations" you mean that
> you can easily transfer control between the point where the exception
> is raised and the exception handler.
>
> If this is what you mean, you can achieve the same effect with monadic
> code by chaining monads together
Yes.
José, this is mainly the question of efficiency. You don't need to
establish contact between the distant stack frames, and you may
propagate failures if this happens seldom. But if the escaping
continuation is a frequent case, it might be more economic to "jump".
This is as simple as that.
Jerzy Karczmarczuk
More information about the Haskell-Cafe
mailing list