Subject: Properties and the runtime



Up to this point, I've thought of properties as "syntactic sugar" for method calls. That is myObject.size should compile the same as [myObject size] unless of course a custom getter is set in the property declaration, then it would compile the same as if I had called that getter. What makes me question this is that there's apparently a need for dealing with properties at the runtime level, as discussed in http://developer.apple.com/DOCUMENTATION/Cocoa/Conceptual/ObjCRuntimeGuide/Articles/ocrtPropertyIntrospection.html

I can't think of anything about properties that needs to be dealt with at runtime. My understanding has it that all information necessary for what properties do is available at compile time. E.g. the method to call, return types, how to compile synthesized properties using copy, retain, assign, nonatomic, and also whether to throw an error if something is readonly. So, then, my question is, what about using properties requires a runtime component? To me it feels like everything could be handled by the compiler.

Luke
_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@xxxxxxxxxxxxxxx)

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/maillists%40codeha.us

This email sent to maillists@xxxxxxxxx

...



Privacy