So varied scopes are bad because they promote lax coding practices? I've always sort of liked the ability to look at a var and know quite a bit about it, sight unseen, by knowing its scope.
------------------------------------------- Matt Robertson, [EMAIL PROTECTED] MSB Designs, Inc. http://mysecretbase.com ------------------------------------------- ---------- Original Message ---------------------------------- From: "John Paul Ashenfelter" <[EMAIL PROTECTED]> Reply-To: [EMAIL PROTECTED] Date: Thu, 19 Jun 2003 16:55:35 -0400 >From: "Bryan Love" <[EMAIL PROTECTED]> >To: "CF-Talk" <[EMAIL PROTECTED]> >Sent: Thursday, June 19, 2003 4:15 PM >Subject: RE: Called as module or include? > > >> For one, it adds definition to the code. It's easier to see what's going >on >> when the FORM or URL scope is explicity used. >> >> For two, there are a few times when you'll have a page that could accept a >> variabl via form or url. In this case you MAY choose to leave the >variable >> name unscoped so that either one will be picked up by the code, but >further >> down in the same code you may need to distinguish between FORM or URL to >> determine a course of action. >> >> There are plenty more reasons hiding out there, but these are two I can >> think of right now... > >Those are the ones I want to hear. These reasons are both basically "So I >can allow scope precedence to handle my variable scoping for me and hope I >don't accidentally use the same variable name in two searched scopes to mean >two different things". > >> I'm sure someone will berate me for even mentioning >> the second one, and to them I say "there is a time and place for >everything" >> ;) > > >Regards, > >John Paul Ashenfelter >CTO/TransitionPoint >----- Original Message ----- > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

