> My intuition tells me these two are doing completely different things.

I'd agree with Scott

With...

        cfc.doMethod().doAnotherMethod();

...the object returned from cfc.doMethod() is sent doAnotherMethod()

Whereas with 

        cfc.doMethod();
        cfc.doAnotherMethod();

doAnotherMethod() is sent to cfc, which may or may not have a method named
as such.

Sorry about all the talk or sent, I've been learning SmallTalk for the last
9 months :O)

Ade

-----Original Message-----
From: Scott Keene [mailto:[EMAIL PROTECTED]
Sent: 06 October 2003 22:45
To: [EMAIL PROTECTED]
Subject: RE: [CFCDev] Method chaining overhead


> Not chaining also removes the ambiguity of "what is 
> doMethod() returning". I only chain when doMethod() returns 
> something DIFFERENT from the object it's a member of.  
> Something like this:
> 
>   myList.get(index).getName();

I definitely agree with this, though I don't have a problem with
chaining in general. This is certainly ambiguous:

> cfc.doMethod().doAnotherMethod();
> 
> As opposed to...
> 
> cfc.doMethod();
> cfc.doAnotherMethod();

My intuition tells me these two are doing completely different things.

----------------------------------------------------------
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]
----------------------------------------------------------
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