• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessor methods and (auto)release: conclusion
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Another try: removing the focus from an NSTextField
      • From: Marco Binder <email@hidden>
References: 
 >Re: Accessor methods and (auto)release: conclusion (From: Simon Stapleton <email@hidden>)

  • Prev by Date: Re: Cocoa development using Java - Suggested references
  • Next by Date: NSScreen, CG and fullscreen bug?
  • Previous by thread: Re: Accessor methods and (auto)release: conclusion
  • Next by thread: Another try: removing the focus from an NSTextField
  • Index(es):
    • Date
    • Thread