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

IGotD- nise at nise.com
Tue Mar 1 10:27:10 UTC 2022


On Tuesday, 1 March 2022 at 07:50:27 UTC, forkit wrote:
>
> We need to refocus on why exception handling was introduced, 
> and not just on it's 'cost'.
>

Yes, features always comes at a cost. Bounds checking costs CPU 
cycles but most people are OK with the extra cost.

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.


More information about the Digitalmars-d mailing list