Properties and the runtime
Properties and the runtime
- Subject: Properties and the runtime
- From: Luke the Hiesterman <email@hidden>
- Date: Sun, 29 Mar 2009 22:06:23 -0700
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 (email@hidden)
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:
This email sent to email@hidden