nothrow by default

Steven Schveighoffer schveiguy at
Thu Jan 9 15:07:53 UTC 2020

On 1/9/20 7:51 AM, Adam D. Ruppe wrote:
> On Thursday, 9 January 2020 at 06:26:41 UTC, Walter Bright wrote:
>> I expect that exceptions will soon become a legacy feature.
> I've seen no evidence of that whatsoever. Exceptions, like GC, are a 
> proven winner in the real world with the vast majority of actually 
> existing industry code using them successfully.
> Reminder that exceptions were invented because error codes *cannot* say 
> the same thing.
> There are some new techniques being tried out in some places to varying 
> levels of success. Those features are useful for other purposes too, so 
> I wouldn't mind D picking some of them up, like I said in a previous 
> message.
> But even with those available, I expect that error handling mode will 
> remain relatively niche because of the enormous success exceptions have 
> and have had proven in industry.

I could see "nothrow by default" added making it an easier transition to 
Swift-like error handling (errors passed back on the stack, made to look 
like exceptions to user code).

I would like to see dip1008 get some more TLC before we think about 
abandoning exceptions altogether. And switching Errors to non 
throwables, terminate in place with stack trace, would be very useful.


More information about the Digitalmars-d mailing list