• 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: Accessors
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessors


  • Subject: Re: Accessors
  • From: Chris Ridd <email@hidden>
  • Date: Wed, 07 Aug 2002 10:29:38 +0100

On 7/8/02 9:11 am, Marcel Weiher <email@hidden> wrote:

> On Wednesday, August 7, 2002, at 06:42 Uhr, Brent Gulanowski wrote:
>
>
>> What I find is missing from the various viewpoints is some good
>> terminology -- so far, I think that the only designations I've seen
>> for various patterns are "retain/release", "retain/autorelease",
>> "ugly" and "simple". And maybe "really simple". Not very helpful.
>> Please name these patterns so we know we are talking about.
>
> Accessor: a method that provide access to instance variables, and no
> more.
>
> Accessors are replacements for direct access to instance varibles. Why
> not access the instance variables directly? Because the object may
> change in the future in such a way that accessing that instance
> variable directly is no longer appropriate. So accessors are a way of
> dealing with future change, if you're code is never actually going to
> change, you wouldn't need accessors. (Note that this is different from
> *thinking* that your code is nevery going to change... ;-)

If the future change removes that instance variable, but you rewrite the
"accessor" to synthesize a return value, what is the "accessor" called then?
This surely breaks your simple classification scheme.

Cheers,

Chris
_______________________________________________
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:
    • Re: Accessors
      • From: Marcel Weiher <email@hidden>
References: 
 >Accessors (From: Marcel Weiher <email@hidden>)

  • Prev by Date: Can launch app as root but not as any other user
  • Next by Date: on NScolor
  • Previous by thread: Accessors
  • Next by thread: Re: Accessors
  • Index(es):
    • Date
    • Thread