I have not tested this in any way at all, but from informal talks with
Michael Dinowitz, I believe by specifying "void" as the return type,
ColdFusion does NOT set aside any memory pointers for the return value
(where as with "any", it sets up something to handle the return value).
My guess is that by using "void" you are bypassing what ever
return-value handling mechanism needs to get put in place... Is it
faster? Mabye my nanoseconds. Is it better for memory usage? Again,
maybe infiteceimally better. 


......................
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-----Original Message-----
From: Doug Bezona [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, April 10, 2007 9:24 AM
To: CF-Talk
Subject: Re: Small Question: any vs viod

They serve entirely opposite purposes.

"Any" means the return value of the CFC can be of any type, so no type
checking.

"Void" means the CFC doesn't return any value at all, and if you try to
return something, it will throw an error. It isn't "type" checking so
much, as just making sure nothing is returned at all.

On 4/9/07, John Allen <[EMAIL PROTECTED]> wrote:
>
> Unimportant but i was curious if returntype="any" was any "faster" 
> than returntype="void"? Is "void" typed checked at run time?
>
> I googled and found nothing (could be its been a long day), just a 
> curious question.
>
> Thanks,
> John Allen
>
> and YOU ALL RULE!!!
> I LOVE COLDFUSION!
> SHOUT OUT TO TRANSFER | COLDSPRING | MARK DREW (you are the coolest!!!

> I love you man!) | and MORE GOODER MODELGULE
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
Experience Flex 2 & MX7 integration & create powerful cross-platform RIAs
http://www.adobe.com/products/coldfusion/flex2/?sdid=RVJQ 

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:274944
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to