Spike wrote:
1. I'm lazy and it's a bit slower to type queryNew('unknown') etc. Then I
run into internal conflicts saying that if I'm going to create the query, I
really should give it the right columns. That then leads to a bit more
maintenance overhead if I need to change which columns the real query is
returning.
Ah I had a feeling that was going to come up. If you are displaying a query and not allowing for it to be empty. That IMO is a poor choice and is in fact playing into the part of a lazy coder.
3. If I ever change the type of the variable, say from a query to an xml file, I have one less place where I might forget to update the reference and so introduce a sleeping bug. On the surface you might think this is still a problem if I change from using a structure to an array, but in that case you usually have to go back to the point where the variable is initialized in order to make the change at all.
Hence the nice addition of the var scoped variables at the top of the function.
I occasionally mull over the wisdom of initializing any local variables to anything other than an empty string for the reasons I mentioned in point 3, but so far it hasn't bitten me, and again, it allows me to follow the path of the lazy coder. Only doing things where necessary.
Laziness is not my chosen path, maybe that is one of the reasons I choose to initialize my variable types.
----------------------------------------------------------
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]
