Re: accessor generation???
Re: accessor generation???
- Subject: Re: accessor generation???
- From: Lance Bland <email@hidden>
- Date: Fri, 5 Jul 2002 08:49:55 -0400
On Friday, July 5, 2002, at 07:52 AM, Ondra Cada wrote:
What is it about all the "accessor generators", "accessor creation
macros"
, and what-you-have, which positively swarm here?
Perhaps the problem is that I use some wrong design principles, but in
15+
years of object programming in ObjC I've needed plain accessors of
type
-blah { return blah; }
-(void)setBlah:b { [blah autorelease]; blah=[b retain]; }
so rarely, that using a generator for them would be utterly ridiculous:
in
long-time average, perhaps one of twenty or thirty my property variables
needed such an accessor. In vast majority of cases there is more complex
behaviour encapsulated (ie. my API-level "accessors" rarely map directly
to property variables), and the behaviour differs for different classes
considerably...
I feel it somewhat strange: does that mean my programming style differs
so
much from the one of majority of others?
One of the criterion for our old framework design was to have no simple
accessor methods. The criterion for our new framework design is to make
heavy use of simple accessor methods. Both designs are legitimate, so it
depends on how you want to structure your code.
-lance
------------------------------------
Lance Bland
mailto:email@hidden
web charts at
http://www.vvi.com/products/chart
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.