Le 26 mai 2010 à 14:22, Graham Cox a écrit :

> I'm pretty sure you are mistaken. If this were even remotely true, object 
> programming would be impossible.
> 
> @private only declares the visibility of an ivar to its subclasses, it does 
> not give the compiler carte blanche to write over anything it fancies.

Hmmm... Let's say you have a class A with a private variable "priv" and b a 
pointer to a subclass of A. Is:

[(A *)b priv]

legal?

Now, admitting B never accesses any of A variables, can the compiler optimize 
space by throwing away all A private variables?

Vincent

PS: thanks for this "carte blanche" 
:)_______________________________________________

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