On Tue, 20 Jul 2004 14:16:56 -0700, Spike <[EMAIL PROTECTED]> wrote:
> I prefer not to set function local variables to an specific type until I'm
> actually about to use them. I alwasy initialize them to an empty string if I
> can't initialize them to their final value. That is, I will initialize
> structures and arrays up front if I know they will definitely hold a value
> at some point. Otherwise I will initialize them to an empty string.
I initialize variables to 0 and seeing this discussion made me realize
that my choice is driven by my C / C++ background, where 0 is
'null'... old habits die hard!
> 1. I'm lazy and it's a bit slower to type queryNew('unknown') etc.
...and 0 is even faster to type! :)
At least we're all in agreement that using 'var' (and therefore having
to initialize variables) is a good thing, especially for things like
query variables that many people otherwise forget...
--
Sean A Corfield -- http://www.corfield.org/blog/
"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]