nothrow by default
IGotD-
nise at nise.com
Sat Jan 4 23:51:23 UTC 2020
On Saturday, 4 January 2020 at 22:01:48 UTC, JN wrote:
> 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.
I agree, we could use "throws" instead of "throw".
More information about the Digitalmars-d
mailing list