Re: What's the point of @properties?
Re: What's the point of @properties?
- Subject: Re: What's the point of @properties?
- From: Matt Neuburg <email@hidden>
- Date: Tue, 21 Sep 2010 18:48:53 -0700
- Thread-topic: What's the point of @properties?
On Sun, 19 Sep 2010 13:29:20 -0700, Bill Bumgarner <email@hidden> said:
>- synthesis "just works" (pretty much every attempt at hand-rolled atomicity
I've seen has been wrong or bog slow)
And even if properties did nothing for me beyond writing my accessors for
me, it would still be worth it. They don't actually save me from much work;
okay, I don't have to write the accessors, but I still have to say
@synthesize; and they know nothing about releasing in dealloc. But before
properties I used to jump through hoops just so as not to have to declare an
ivar, because it was so much work to support it; with properties, that pain
in my hands is gone.
On Mon, 20 Sep 2010 03:56:20 -0700, Chris Hanson <email@hidden> said:
>Don't think of dot syntax as syntactic sugar for sending messages. Think of dot
syntax as the way to access the state exposed by an object, and bracket syntax
as the way to have an object do something.
No, I think that's bollocks. Dot syntax is *exactly* syntactic sugar for
calling the accessor, and using it correctly depends upon keeping that fact
firmly in mind. m.
--
matt neuburg, phd = email@hidden, <http://www.tidbits.com/matt/>
A fool + a tool + an autorelease pool = cool!
AppleScript: the Definitive Guide - Second Edition!
http://www.apeth.net/matt/default.html#applescriptthings
_______________________________________________
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