> The (possible) memory leak issue does not appear to be an issue anymore.
> It was submitted to Adobe as a bug for, at least, versions 6, 6.1, and
> 7, and seemed to have been resolved with the release of version 8 (some
> profiling tests, run by others, appear to verify that fact). That said,
> it's a habit now, and one that works well for me (and my variables are
> always scoped). It also makes sense to me, where naming (of the other
> scopes) serves some purpose in defining where a particular variable
> might've be declared. But that's me.

I do remember a problem with passing variables from shared scopes to
the Variables scope in CF 6 and 7. But I still think that people in
general are better off using the Variables scope where it makes sense,
and the Request scope where that makes sense, in the absence of any
version-specific bug that makes this untenable. After all, people used
to duplicate shared scopes into local variables in CF 5 and earlier to
work around locking issues, but just because that arguably* made sense
at the time doesn't make it a good programming practice now.

But in any case, it seems that this thread is actually covering
several different topics. The OP seemed to be asking whether it made
sense to use the Variables scope when using CFSET:

<cfset foo = "bar"> vs <cfset Variables.foo = bar>

and the answer to that seems to me to be, it really doesn't matter as
long as you're a competent CF programmer and know that the default
scope is Variables.

But then, many people seemed to read a bit more into the original
question (assuming I read it correctly myself, I guess) and turned it
into, should all variable references be scoped:

<cfoutput>#foo#</cfoutput> vs <cfoutput>#Variables.foo#</cfoutput>

and the answer to that seems to be to me, yes, it's absolutely a good
idea to always include the scope in references to variables.

Finally, you and I are discussing the relative merits of different
scopes, I guess, which is a third topic.

* it really didn't make sense at the time, but many programmers found
it much easier than locking things throughout the page.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/
http://training.figleaf.com/

Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on
GSA Schedule, and provides the highest caliber vendor-authorized
instruction at our training centers, online, or onsite.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:344740
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to