nothrow by default
JN
666total at wp.pl
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,
>
> https://github.com/dlang/DIPs/pull/167
>
> 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