nothrow by default

JN 666total at
Sat Jan 4 22:01:48 UTC 2020

On Saturday, 4 January 2020 at 21:38:53 UTC, Walter Bright wrote:
> The first step is to add `throw` as a function attribute,
> The next step will be to make nothrow the default. I have not 
> prepared a DIP for that yet, but will.
> The short rationale is that exceptions being a "pay only if you 
> use them" is a complete fraud. They're expensive to support, 
> meaning performance programs use other ways of signalling 
> errors and use nothrow.

While reusing throw might be convenient, it also makes the code 
less greppable. Kind of like static in C has three different uses.

More information about the Digitalmars-d mailing list