A slight diversion, but this is something that gets on my nerves about
cfparam, it's main use is the creation of a variable if it doesn't exist
already? So why does the type attribute do validation? I've posted this on
cf-talk but got answers to questions I didn't ask. I think cfparams type
attribute should make it work like

        <cfif NOT IsDefined("myVar") OR NOT IsNumeric(myVar)>
                <cfset myVar = 10>
        </cfif>

and not throw an error on a type mismatch.

Ade

-----Original Message-----
From: Dave Carabetta [mailto:[EMAIL PROTECTED]
Sent: 25 July 2003 21:15
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] CFC Caching


>Actually, I left that out as I saw no need to add the extra validation and 
>the
>overhead it brings. I know it's something tiny, but if its not needed, I 
>leave
>it out.

How much is the additional overhead? I find it hard to believe that it's 
anything noticeable. Have you run any stress testing to indicate otherwise? 
Ironically, I had actually heard that *not* having the type attribute was 
slower. My personal preference is to always be as explicit as possible, when

reasonable. But, to me, that's all minutiae, as I think we're talking about 
tenths of milliseconds, and the true focus should be on caching and other 
higher-level things (unless, of course, your testing has proven otherwise).

Regards,
Dave.

_________________________________________________________________
MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*.  
http://join.msn.com/?page=features/virus

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

Reply via email to