Re: accessor generation???
Re: accessor generation???
- Subject: Re: accessor generation???
- From: Phillip Mills <email@hidden>
- Date: Fri, 5 Jul 2002 08:23:01 -0400
On Friday, July 5, 2002, at 07:52 AM, Ondra Cada wrote:
I feel it somewhat strange: does that mean my programming style differs
so
much from the one of majority of others?
I've been doing OO stuff (non-Objective-C) for at least 10 years and my
experience is the same as yours. In fact, I'd come to believe that
simple accessors were a symptom of a possible bad design. They often
pointed to classes where no one had thought about their role or behavior.
The Cocoa books and examples, however, give me an impression of a
different norm. Much of this stuff demonstrates limiting objects'
access to their own member variables and using things like...
[self setProp: 3];
...instead of...
prop = 3;
So I, probably along with others, was adapting my practice to what
seemed a Cocoa/Objective-C "cultural" thing. If we're being taught to
code everything using accessors rather than variable references, it
makes sense to automate the simple ones.
_______________________________________________
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.