|
From: James W. W. <os...@jw...> - 2005-01-28 20:41:32
|
On Jan 27, 2005, at 8:06 AM, Joseph J. Strout wrote: > I hope I'm not (again) chiming in late here, but I hope we're building > Quesa (or at least, making it possible to build quesa) with exception > support turned off. In at least some compilers, having exceptions on > incurs a noticeable overhead even if you're not using them. As I may have mentioned before, the STL was designed with the expectation that exception support would be on. I think it would be a poor idea to build it with exceptions off. That said, the Quesa source code does not currently contain any explicit throw statements. Hmm, I see that I did use one new statement without nothrow, I guess I should fix that. What happens to a try/catch block if exceptions are off? What compilers have a noticeable overhead for exceptions? I don't think either gcc or CodeWarrior fall into that category. > My experience also matches Dair's, i.e., that in C++ code, exceptions > tend to cause more grief than good. I strongly disagree with that, if exceptions are used well. It took a few years for people to learn how to use them well, e.g., how to write exception-safe code, so some early experience may have been negative. I've read a bunch of books to learn good C++ techniques, and I can't remember any book suggesting that one not use exceptions. -- <http://www.jwwalker.com/> |