Checked vs unchecked exceptions
Moritz Maxeiner via Digitalmars-d
digitalmars-d at puremagic.com
Mon Jun 26 10:50:47 PDT 2017
On Monday, 26 June 2017 at 17:44:15 UTC, Guillaume Boucher wrote:
> It is very well possible to use option B in D. The most
> convenient one is making functions nothrow and use
> Algebraic!(T, ErrorCode), or, for void functions, have a
> parameter "ref ErrorCode".
> If all functions in Phobos would either follow that pattern or
> provide an alternative nothrow overload, I would consider that
> problem solved.
I have tried using such Monads in D, but in the end it always
ended up being too verbose or too hard to read compared to using
exceptions or even simple error codes (with 0 == no error).
More information about the Digitalmars-d
mailing list