Coming in a little late here...

> Can anyone see a good reason why I shouldn't use the $ to denote
> locally scoped variables in functions?

I think it's a fine idea. My personal preference is to var each
variable, but I understand the motivation for creating a local struct.
And if I was looking at code I think I'd notice the local struct
convention much more quickly with the $.

The $ serves as a warning. It says, "Hey, there's something special
going on here. This isn't just a case of some clueless programmer with
a structure fetish."

The $ looks and feels like a symbol, rather than a variable name. As a
result, I think the $ example is less cluttered and more readable than
the lcl example.

I'm actually tempted to switch the local struct convention now. :)

Patrick
 
-- 
Patrick McElhaney
704.560.9117
http://pmcelhaney.weblogs.us


----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]


Reply via email to