The point of this is not what you or I would use. It's designed to 'force' people to localize their variables. If they did what was right, then this would not be needed. As most people do not localize their vars, I'm trying to create a psychological 'reminder' for them. There is a difference between the code you use locally and the code you provide to others. For others you have to teach, train, and yes, even manipulate to get them to do what's right. $variable is as 'loud' a statement of localization that I can think of.
> Hey Michael, > > I wouldn't use a prefix - instead, I recognize a variable as being > local to a function by its lack of a scope, explicity stating the > scope of variables in the arguments or variables scopes. Also, > addressing arguments as "arguments.name" should be a touch of a > performance boost as CF doesn't have to look into the 'local' scope to > find your variable, realize it isn't there, then look at arguments. > > -joe > > > > On Thu, 23 Dec 2004 14:54:34 -0500, Michael Dinowitz > <[EMAIL PROTECTED]> wrote: >> I've started to use a dollar sign as a prefix for variables which are >> local >> to a function or CFC. i.e. those variables created when using the var >> keyword. >> <CFSET var $Localvar=""> >> I could have also used an underscore like so: >> <CFSET var _Localvar=""> >> I plan to give out the new CFCs and functions I'm writing (the logger is >> in >> use and is being tweaked as we speak) and was wondering which you, the >> ColdFusion using world, would prefer. I like the dollar sign, but I'm >> willing to listen to what people have to say. >> >> As an aside, can someone using Blue Dragon please test to see if the >> dollar >> sign and underscore are legal for variables on that platform? Thanks >> >> > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Special thanks to the CF Community Suite Silver Sponsor - CFDynamics http://www.cfdynamics.com Message: http://www.houseoffusion.com/lists.cfm/link=i:4:188727 Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

