CFDevcon 2008, Brighton, UK

Viewing By Entry / Main
May 20, 2008
varScoper, an essential tool for all ColdFusion developers that use CFCs, has just been updated tonight. If you're using it, you'll want to download this update to take advantage of the improvements in this release.

If you're not using varScoper... WTF? Are you crazy? Are you not using CFCs? varScoper is an absolutely essential tool for you. Did I say essential?

Comments

Hopefully this bug is fixed in CF9[/rant]


@Dan, it's not a "bug" - it's how the language is designed and changing the behavior would break a lot of code. Sloppy code, admittedly, but it would break it nonetheless.


I agree with everything you said but there are definitely ways the language could be improved that it does not break code. For example one or both of the following strategies...

Option 1 (ease pain): Allow var scoping anywhere in where a variable is set or output variable name is passed (query name, index, etc), and possibly default automatic variables (cfhttp, cfcatch, etc) to "var scope". The latter could break some code but very little IMO and this could be a check in the code compatibility analyzer.

Option 2 (fix): Add attribute to cfcomponent specifying that that function variables default to local scope.


Those both sound like good enhancements.


Sean, couldn't resist having a dig at you on this one. I remember it was only a couple of years ago you were telling everyone that they must be craaazy if they don't var scope all their cfc local variables. (Which I agree with!!) This is the first I've heard of varScoper and to me it just looks like prescription for lazy programming.


@Jason, I've always been a fan of automated QA tools that help you follow coding guidelines. When I was at Programming Research (PR:QA), I built tools for C and C++ that analyzed source code and reported anything that didn't follow best practice.

varScoper is just that: a tool that helps check you are following best practice.


I was in the second row at the CFUnited keynote with a big grin as Ben announced the changes for function local variables. Great to hear along with all of the other enhancements in the pipeline.


Post Your Comments
Name:
Email Address:
Comments
*** Please note that all comments require moderation so it may be some time before your comment posts to this blog! ***
Remember My Information:
 



Hosting provided by