On Thursday, Sep 11, 2003, at 12:58 US/Pacific, Raymond Camden wrote:
Are you saying that if you don't do anything special with your get/set
than it's not worth the time?

Partly. Mostly it's a case of "what is the public API to your class?" - are these get/set methods *really* part of your *public* API? If your data members aren't meant to be public, why systematically expose them via get/set methods?


What about setting up getX/setX in case
you _eventually_ have special conditions for setting data members? In
other words, planning for the future where getX may need to do a
security check or somesuch.

Yes, that's fine if that attribute is part of the public API of the class.


Go read Holub's article - he talks about a well-designed class managing its own data, not handing it out to other classes. Even if you don't like his provocative style, it should make you think about how you design your classes.

Sean A Corfield -- http://www.corfield.org/blog/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the word 'unsubscribe cfcdev' in the message of the email.


CFCDev is run by CFCZone (www.cfczone.org) and supported
by Mindtool, Corporation (www.mindtool.com).

An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]

Reply via email to