Feedback from the Gripes and Wishes Campaign

Ernesto Castellotti erny.castell at gmail.com
Mon May 29 21:18:23 UTC 2023


On Monday, 29 May 2023 at 20:57:22 UTC, H. S. Teoh wrote:
> On Mon, May 29, 2023 at 08:21:37PM +0000, Ernesto Castellotti 
> via Digitalmars-d wrote:
>> On Monday, 29 May 2023 at 18:40:52 UTC, Paul Backus wrote:
>> > revisiting the use of exceptions in the standard library
>> 
>> As far as I'm concerned, they really shouldn't be used. I 
>> think exceptions are one of the worst features of C++, Java 
>> and D etc
>
> Care to elaborate why?
>
>
> T

Mainly because exceptions are often used for errors that aren't 
really exceptional", I often found myself having to handle 
exceptions (mostly in Java and C++) that really didn't give a 
damn and just abort the program.

I have rarely seen exceptions handled well by programmers other 
than in C++ code done by really experienced programmers, I much 
prefer error handling like Rust and Go ie with multi-value 
returns, in my experience I have always found this technique 
leads to much better error handling than using exceptions. 
(https://go.dev/doc/faq#exceptions, 
https://go.dev/blog/error-handling-and-go, 
https://doc.rust-lang.org/book/ch09-00-error-handling.html)




More information about the Digitalmars-d mailing list