• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Properties and the runtime
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Properties and the runtime
      • From: Michael Ash <email@hidden>
    • Re: Properties and the runtime
      • From: Bill Bumgarner <email@hidden>
  • Prev by Date: Re: [Solved] NSTableView updating checkboxes
  • Next by Date: Re: Properties and the runtime
  • Previous by thread: Re: ack no class
  • Next by thread: Re: Properties and the runtime
  • Index(es):
    • Date
    • Thread