discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Setter Gettor method style


From: Nicola Pero
Subject: Re: Setter Gettor method style
Date: Tue, 6 Aug 2002 16:46:18 +0100 (BST)

> Would it be reasonable to declare one as the standard and document 
> whenever you choose the other one (because of speed/ simplicity for 
> the user)?
> 
> What do you think should be the standard then?

The standard is what the basic, standard, classes do.  The basic, standard
classes are NSArray, NSDictionary, NSSet, and similar.

These classes RETAIN objects when they are set, return them directly
(without additional retain/autorelease), and RELEASE them when they are
replaced.  In other words, the pattern I described to you.

Not even Apple can change the API of those classes.

Btw - all newbies will start learning from these classes, so this is the
behaviour which they will find familiar when they move on to other
classes, and having other classes with a different behaviour might
actually be more confusing than helpful for them.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]