Since doing that would typically require you return "THIS", and since "THIS"
is just a reference the overhead should be minimal.  Seems it falls in the
category of a de minimis performance issue when compared to big picture
concerns.



> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Matt Liotta
> Sent: Monday, October 06, 2003 12:27 PM
> To: [EMAIL PROTECTED]
> Subject: [CFCDev] Method chaining overhead
>
>
> I have noticed a number of people using syntax like the following with
> there CFCs.
>
> cfc.doMethod().doAnotherMethod();
>
> As opposed to...
>
> cfc.doMethod();
> cfc.doAnotherMethod();
>
> While it is certainly debatable as to which is better from a stylistic
> point of view, I wonder if there is more overhead associated with the
> first technique. Here's my thought, since the first technique requires
> the method to return a value it has slightly more overhead than a
> method that doesn't. I don't know if that is actually true, but
> anecdotally it seems as such. While I don't claim to know the internals
> of CFMX, it seems that it has some casting overhead sometimes when it
> returns data from a method.
>
> Thoughts?
>
> Matt Liotta
> President & CEO
> Montara Software, Inc.
> http://www.MontaraSoftware.com
> (888) 408-0900 x901

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