'unwrap envy' and exceptions

Dukc ajieskola at gmail.com
Sat Sep 11 20:13:07 UTC 2021


On Friday, 10 September 2021 at 23:20:17 UTC, IGotD- wrote:
>
> Walter mentioned that exceptions are on the way out because 
> they are expensive and inhibits the optimizer which are fair 
> points. I interpreted this that Walter wants to move away from 
> exceptions in D. Since then I haven't seen any proposal for any 
> new error handling for D.

Well the `@nodiscard` proposal, that is very likely to get 
accepted, is sort-of one. It's basically about returning 
traditional error values, but forcing the user to be explicit if 
she really wants to summarily discard them.


More information about the Digitalmars-d mailing list