[OT] - C++ exceptions are becoming more and more problematic
    Alexandru Ermicioi 
    alexandru.ermicioi at gmail.com
       
    Thu Feb 24 08:42:00 UTC 2022
    
    
  
On Thursday, 24 February 2022 at 07:23:34 UTC, rikki cattermole 
wrote:
>
> On 24/02/2022 6:05 PM, Walter Bright wrote:
>> One of the requirements I proposed for Phobos2 was for it to 
>> not use exceptions.
>
> This is the sort of code we are going to end up with without a 
> solution like value type exceptions. Explicit error types and 
> returns ala @mustuse are not better than runtime exceptions, 
> they are much worse for readability.
>
> We need a better solution than this.
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.
    
    
More information about the Digitalmars-d
mailing list