On Sat, 3 Nov 2001, Dave Rolsky wrote:

> I don't actually object to having separate methods.  My
> point was more that a verb isn't always a good thing.
> $cgi->get_param is really no clearer than $cgi->param,
> _given_ that there is a known convention of not
> prepending 'get_' to accessors.  I don't mind prepending
> 'set_' (or whatever) for set methods because I think its
> a good idea to emphasize that something in the object
> will change if you call that method.

the verb can give a clue as to the type of attribute being
accessed. ex:

 - getFoo, setFoo for strings, ints, floats
 - isFoo, setFoo for bools
 - findFoo, getFoos, addFoo, removeFoo for lists

this can be quite handy for clearly understanding an api.

Reply via email to