[OT] - C++ exceptions are becoming more and more problematic

rikki cattermole rikki at cattermole.co.nz
Thu Feb 24 11:07:31 UTC 2022


On 24/02/2022 9:42 PM, Alexandru Ermicioi wrote:
> So why not have this implemented as underlying mechanism for existing 
> try catch syntax, with option to choose which one to use?
> 
> If done so, there shouldn't be any usability downgrade, when selecting 
> either existing or new exception mechanism, only distribution of 
> performance overhead will change.

My concern is that there will be situations which no one can predict; 
exceptions are very hairy (after all, they can go up the chain of 
functions not written in D).

This is why I'm not suggesting that we should replace exception handling 
in the general case. Only where the compiler can see that it can be done 
(plus this can be improved over time).


More information about the Digitalmars-d mailing list