[OT] Is there a real alternative to exceptions ?
Meta
jared771 at gmail.com
Fri Jan 17 00:21:35 UTC 2025
On Thursday, 16 January 2025 at 19:02:05 UTC, Basile B. wrote:
> I have the feeling that things like
>
> ```
> a.map!(mapperFun).reduce!(reducerFun).array;
> ```
>
> is only possible thanks to an exception system. A similar
> expressivity looks impossible for example with the idom of
> result tuple `(error_code, actuallResult)`.
It's very easily doable, arguably with even better ergonomics
than with exceptions:
https://fsharpforfunandprofit.com/rop/
C/C++ programmers are just stuck in the 80s 😛
More information about the Digitalmars-d
mailing list