Veering back to the original topic...
Roger and Nat (among others) seem to be convinced that it's
important to identify a variable as "incoming." I strongly
disagree.
First of all, how do you define an "incoming" variable? You
seem to suggest that "incoming" means incoming to the circuit.
But if that's the case, "attributes" should be read-only, right?
Why would you ever write to an "incoming" parameter? Wouldn't
that taint its status as "incoming"? Part of my problem with
"attributes" is that it truly is a scope for "incoming"
parameters, and therefore should not be modified.
What the "attributes" scope really encompasses is variables that
flow into and out of a fuse. They may have originated from outside
the circuit, or they may have been created in the circuit. They
may have changed one or more times before reaching a particular
fuse.
If it's important to you to know if a variable came from outside
the fuse (a VERY, VERY bad idea, IMHO, because a circuit isn't
supposed to know about its environment), you still have the
original, untouched FORM, URL, and ATTRIBUTES scopes.
Roger argues that it's important to differentiate between
incoming and local parameters. "Attributes" actually blurs
the differentiation, because it's used both as an incoming and
a local scope.
BTW, I think it's very important that we DO NOT USE POINTERS, but
rather copy incoming variables to whatever scope we choose to
use. That way we can preserve the original values of incoming
parameters, which is important to some people.
Patrick
> -----Original Message-----
> From: Roger B. [mailto:[EMAIL PROTECTED]]
> Sent: Friday, March 23, 2001 5:05 PM
> To: Fusebox
> Subject: RE: Musings on Attributes (was Best Practices...)
>
>
> > What they
> > should have done is just copy everything to the local scope (variables).
>
> Patrick,
>
> Nah... then they would end up losing their status as "incoming" variables.
> In my code, "attributes" means something significant: that
> variable made it
> into the mix via an URL, a form, or a custom tag attribute. Simply dumping
> it into the variables scope would be throwing away useful
> information, IMO.
>
>
> --
> Roger
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists