NYCPHP Meetup

NYPHP.org

[nycphp-talk] object getter/setter methods

Christopher Merlo cmerlo441 at gmail.com
Fri Mar 11 01:50:43 EST 2005


On Thu, 10 Mar 2005 20:39:49 -0700, Derek DeVries <devrieda at gmail.com> wrote:
> For every object that I create I end up making countless getter/setter
> methods.

If I may be allowed to badly paraphrase Dan's point from a couple days
ago, OOP isn't about writing less code now; it's about writing less
code later.  And who's going to be writing the code later?  Often it's
other people.  Give them as many tools as you can to reduce their
code.

Yeah, a complex enough class is going to have tons of get and set
methods.  That's part of what makes it easy to use.

-- 
cmerlo441 at gmail.com
http://www.theyellowbox.com/



More information about the talk mailing list