On Jan 29, 2010, at 11:16 AM, Keith Blount wrote: > A habit from my fear that the compiler will get even fussier (for instance it > is these days fussier about conditional expressions).
The compiler will never complain about that. It's a basic tenet of object-oriented programming that an instance of a subclass is a perfectly valid instance of its superclass(es)*. So it's always valid to assign a subclass pointer to a superclass pointer variable (or return value). —Jens * Except that in C++ you can violate this, intentionally, by using private inheritance..._______________________________________________ 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]
