[OT] Is there a real alternative to exceptions ?
Basile B.
b2.temp at gmx.com
Fri Jan 17 08:48:50 UTC 2025
On Friday, 17 January 2025 at 00:21:35 UTC, Meta wrote:
> 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 😛
Nice, thanks for the link, so finally it seems that the problem
would be solved since 2014.
More information about the Digitalmars-d
mailing list