Re: Properties and the runtime

2009-03-30 Thread Michael Ash
On Mon, Mar 30, 2009 at 1:06 AM, Luke the Hiesterman wrote: > 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 > woul

Re: Properties and the runtime

2009-03-29 Thread Bill Bumgarner
On Mar 29, 2009, at 10:39 PM, Luke the Hiesterman wrote: On Mar 29, 2009, at 10:35 PM, Bill Bumgarner wrote: @synthesize synthesizes the implementation of the methods only and that is where the runtime dependency is introduced. Does this statement imply that there is no runtime dependency if

Re: Properties and the runtime

2009-03-29 Thread Luke the Hiesterman
On Mar 29, 2009, at 10:35 PM, Bill Bumgarner wrote: @synthesize synthesizes the implementation of the methods only and that is where the runtime dependency is introduced. Does this statement imply that there is no runtime dependency if I do not synthesize my properties? Luke

Re: Properties and the runtime

2009-03-29 Thread Bill Bumgarner
On Mar 29, 2009, at 10:21 PM, Luke the Hiesterman wrote: So, if I declared a property called money and synthesized said property, would [object setMoney:money] and object.money = money compile to the same code? That, of course, implies that we're also inserting property-related code to simpl

Re: Properties and the runtime

2009-03-29 Thread Luke the Hiesterman
So, if I declared a property called money and synthesized said property, would [object setMoney:money] and object.money = money compile to the same code? That, of course, implies that we're also inserting property-related code to simple method calls if they happen to correspond with a prope

Re: Properties and the runtime

2009-03-29 Thread Bill Bumgarner
On Mar 29, 2009, at 10:06 PM, Luke the Hiesterman wrote: 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 t

Properties and the runtime

2009-03-29 Thread Luke the Hiesterman
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