Jared is correct, Scoping improves performance and avoids ambiguity (ref CFMX study guide), and this makes sense.
If you aren't going to scope, then you are decreasing performance and increasing ambiguity. So the best practice is to scope. In an application, based on the needs, you may consider not scoping, but it is that level that is application specific. The broad question of is scoping a best practice, I would answer with a 'yes'. - Calvin -----Original Message----- From: Jared Rypka-Hauer - CMG, LLC [mailto:[EMAIL PROTECTED] Sent: Sunday, March 27, 2005 1:41 PM To: CF-Talk Subject: Re: Best practice question? But it IS a broad application-development question! You can't decide *not* to scope a variable until you know *why* you would scope one to begin with. You can't decide to rely on CF's default scoping capabilities successfully until you know all the implications of them. It is a broad app-dev question because the decision to use a particular technique must be founded in good app-dev skills. There's no getting around that. Explicit scoping _IS_always_ the best idea, unless you have a compelling rationale to break with the best practice. Laterz, J On Sun, 27 Mar 2005 11:48:42 -0500, Claude Schneegans <[EMAIL PROTECTED]> wrote: > >>looks like scoping AND no scoping are desirable depending on the > application. > > Exact, that's one of the advantages of using a weakly or dynimically > typed language. > Since both scoping and no scoping (or default scoping) are features of > CF, rules like "never do" or "always do" > can only make the programmer loose one of the features. -- Continuum Media Group LLC Burnsville, MN 55337 http://www.web-relevant.com http://www.web-relevant.com/blogs/cfobjective ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Logware (www.logware.us): a new and convenient web-based time tracking application. Start tracking and documenting hours spent on a project or with a client with Logware today. Try it for free with a 15 day trial account. http://www.houseoffusion.com/banners/view.cfm?bannerid=67 Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200192 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=11502.10531.4 Donations & Support: http://www.houseoffusion.com/tiny.cfm/54