Re: Accessor methods and (auto)release: conclusion
Re: Accessor methods and (auto)release: conclusion
- Subject: Re: Accessor methods and (auto)release: conclusion
- From: Georg Tuparev <email@hidden>
- Date: Thu, 8 Aug 2002 00:27:43 +0200
On Wednesday, August 7, 2002, at 03:03 PM, Simon Stapleton wrote:
I think, and I hope I'm not stepping on toes here, that what Ondra was
aiming at was the point that no code, other than accessors, should
_ever_[1] directly access instance variables. This is a 100% good
pattern, IMHO, and what accessors you happen to be using should make no
difference.
I've seen this coming up again and again on virtually all virtual
communities (and I think this was discussed on NeXT/Apple mailing lists
several times too, but I might be wrong).
As an eXtreme Programmer you should follow the simplest thing that could
possibly work, and what you are suggesting is definitely not the
simplest. My personal experience is that there are times when your
suggestion is valid, and there are times when it is not. But performance
was never (at least for me) the reason to follow the one or the other
pattern. Somehow it turns out that if you are writing a reusable class
(normally by refactoring) you find more support to impose this
restriction. On the other hand, while writing controller classes, there
is hardly any rational motivation to go through this pain... Of course
other people can have different experiences...
Georg Tuparev
Tuparev Technologies
Klipper 13
1186 VR Amstelveen
The Netherlands
Mobile: +31-6-55798196
_______________________________________________
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.