On Feb 25, 2009, at 1:00 PM, Paul Sanders wrote:

My solution would be to cover *all* inherited initialisers and assert in any
not supported by the subclass.  The idea, surely, is to catch any
programming errors as early as possible. Not covering an initialiser which, if called, would lead to unpredictable results seems to me to be taking an
unnecessary risk (of introducing a bug).

*Now* all we need is an implementation of assert that does something a
little more useful than SIGABRT.  But that is a detail.

Apple's recommendation when a subclass wants to "disavow" a method of its superclass is to have the subclass override invoke [self doesNotRecognizeSelector:_cmd].

Cheers,
Ken

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to