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