nothrow by default

Walter Bright newshound2 at
Sat Jan 4 21:38:53 UTC 2020

On 1/4/2020 8:06 AM, Mike Parker wrote:
> On Saturday, 4 January 2020 at 16:05:10 UTC, Steven Schveighoffer wrote:
>> Just wanted to bring this up, and not muddy the other thread.
>> What do you put if you throw? @safe by default has alternatives. nothrow does 
>> not. Are we going to get a new keyword/uda?
>> -Steve
> Seems like we'd have to. Or on/off attribute parameters.

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.

More information about the Digitalmars-d mailing list