I don't know about the C++ world, but that would pretty much be anathema in
the Java world where setters ALWAYS return void.

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf
Of Sean Corfield
Sent: Wednesday, December 22, 2004 8:47 PM
To: [email protected]
Subject: Re: [CFCDev] Can someone tell me why this doesn't work?

On Wed, 22 Dec 2004 18:30:01 -0600, Dawson, Michael <[EMAIL PROTECTED]>
wrote:
> I hope this doesn't confuse anyone, but setters and getters are very
> similar, in use, to VB's subs and functions, respectively.  VB subs do
> something, but don't return a value; VB functions do something and then
> return a value.

Be aware that a very common style of programming in C++ and Java is to
have setters return this so that you can chain method calls:

person.setFirstName("Sean").setLastName("Corfield");

In other words, saying a setter is like a sub is misleading...
-- 
Sean A Corfield -- http://www.corfield.org/
Team Fusebox -- http://www.fusebox.org/
Breeze Me! -- http://www.corfield.org/breezeme
Got Gmail? -- I have 4 invites to give away!

"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 words '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]

----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email
to [EMAIL PROTECTED] with the words '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