Re: Xcode 4.1 GM exception raised in PDFkit
Re: Xcode 4.1 GM exception raised in PDFkit
- Subject: Re: Xcode 4.1 GM exception raised in PDFkit
- From: Scott Ribe <email@hidden>
- Date: Mon, 01 Aug 2011 18:11:02 -0600
On Aug 1, 2011, at 5:30 PM, Glenn L. Austin wrote:
> Don't use C++ exceptions for normal flow control, only for cases where there is *no* other means of handling the error (ex: the directory you've been told to iterate has been deleted).
In reflecting on my prior post, there is a distinction between Cocoa use of exceptions and what is generally considered good practice with C++. Cocoa says only throw exceptions in case of programmer error; C++ advice generally says only throw an exception in truly unexpected circumstances. So the C++ accepted practice is actually looser, but it in no way implies using exceptions for normal flow control.
And you brought up another point: the cost of throwing exceptions with "zero-cost exceptions"--The minority of C++ apps/libs that had ignored good design advice and used exceptions for normal flow control were pretty much forced to change by this. The only other options involved incompatibility with the rest of the world of libs...
--
Scott Ribe
email@hidden
http://www.elevated-dev.com/
(303) 722-0567 voice
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden