Raymond Chen's take on so-called zero cost exceptions

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Tue Mar 1 10:39:45 UTC 2022


On Tuesday, 1 March 2022 at 10:27:10 UTC, IGotD- wrote:
> Another thing that I don't understand. Exceptions have been 
> around for a long time. In the 90s and beginning of 2000s there 
> wasn't much talk about the cost of exceptions. 20 years later 
> and computers are a magnitude faster, suddenly exceptions are 
> too expensive.

I think it has more to do with microbenchmarking between 
competing solutions when choosing a language for a project.

In some cases you can get better performance with one solution in 
comparison to another.

I guess it also could matter if you transpile to C++ from other 
languages as that can lead to "dumb" code that no proficient C++ 
programmer would write.



More information about the Digitalmars-d mailing list