[thelist] RE: What is the ColdFusion equivalent to eval()?

rcamden at macromedia.com rcamden at macromedia.com
Wed Apr 25 19:13:42 CDT 2001


 Jeff, you and I have argued in the past about best practices, so this
should come as no surprise to you. :) Two responses - why do you feel that
the 'left hand method' is sloppy. To me, it makes a lot more sense, and is
more readable, the setvariable. Secondly, why do you think this is
nonstandard? As far as I know it isn't.

-----Original Message-----
From: jeff
To: thelist at lists.evolt.org
Sent: 4/24/01 11:23 PM
Subject: RE: [thelist] RE: What is the ColdFusion equivalent to eval()?

jon,

:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
: From: jon steele
:
: I used quotes on the left hand side with
: my vars inside the quotes, and it worked
: (Raymond's idea),
:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

i would caution against "dirty" solutions such as the quotes around the
variable name combined with another variable on the left side of the
assignment operator (=).  this is sloppy programming that will lead to
lost
time when maintaining this app down the road.

one thing to keep in mind is that each successive version of coldfusion
server has been more strict than the previous in its tag/code parsing.
what's to say that these sorts of non-standard methods will be allowed
in
future versions?  best practice dictates avoiding these sorts of things
entirely.





More information about the thelist mailing list