> So varied scopes are bad because they promote lax coding practices? > Actually, I'm saying quite the opposite. I'm saying it's a *BAD* idea to reference "someVar" in your code, and let the automatic scope searching try URL, FORM, local, and the other scopes to find the value, which is what the poster suggested doing. Or you can code everything to be FORM.someVar and just use POST to access the page.
> 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. URL and FORM scopes are tightly tied to specific UI implementations -- ATTRIBUTE scope makes a lot of sense since it combines those scopes as well as invocation as a custom tag/module. All I need to know about a variable is it's value -- if I have to know the scope, then logic is probably being built into the code that makes it harder to disentangle and use for another purpose. And as an aside to the original slam on Fusebox, to reiterate another post -- just because fusebox *copies* FORM and URL scope to the ATTRIBUTES scope doesn't mean the original variables are gone. Regards, John Paul Ashenfelter CTO/TransitionPoint ----- Original Message ----- From: "Matt Robertson" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Thursday, June 19, 2003 6:03 PM Subject: Re: Called as module or include? > 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

