On Wed, Sep 22, 2010 at 5:21 AM, Kevin Wright <[email protected]>wrote:

> Exceptions are most certainly not a branch for free!
> As discussed here:
> http://stackoverflow.com/questions/2184935/performance-cost-of-coding-exception-driven-development-in-java
> The cost of building an unused stack trace seems extravagant to me,
> especially as part of an expected control flow.
>

The cost of exceptions stopped being a concern in Java many, many years ago.


>
> They also act as a "shadow type system".  This kind of thing has been
> long-discussed in the C++ community, where checked exceptions are almost
> never used: http://www.gotw.ca/publications/mill22.htm
>

The reason why there are no checked exceptions in C++ is backward
compatibility. Stroustrup just didn't have a choice.

-- 
Cédric

-- 
You received this message because you are subscribed to the Google Groups "The 
Java Posse" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/javaposse?hl=en.

Reply via email to