I have only ever used evaluate() in my CF code once. Every other time I
thought I needed it, I was able to use array notation to solve the problem.

On the flip side I once inherited an app that used evaluate() 839 times.  On
one page, there were 93 instances of evaluate().

On Thu, Mar 19, 2009 at 10:56 PM, Gerald Guido <gerald.gu...@gmail.com>wrote:

>
> >>> In general, evaluating strings as expressions is computationally
> expensive. I can't think of any cases where I've had to use it in quite a
> while, but I suspect there are some rare cases where you can't get what you
> need any other way.
>
>
> Personally I think that the anti-evaluate slant is a bit of orthodoxy that
> was picked up on years ago (when it was much more computationally
> expensive)  and enforced as such by members of the CF community.
>
> Some times it cannot be avoided with out a boat load of thinking and trial
> and error. Case in point, and I will gladly change this bit of code to not
> use evaluate if someone can figure out how to do this in CFscript sans the
> evaluate function:
>
> http://mgt.pastebin.com/f428de8f4
>
> BTW I did  some testing on the above code and the diff between using
> evaluate and the code rendered to be evaluated and was a matter of couple
> of
> milliseconds.
>
> G!
>
>
> On Thu, Mar 19, 2009 at 10:10 PM, Dave Watts <dwa...@figleaf.com> wrote:
>
> >
> > > I must have been thinking about setVariable().  Why "Should not be used
> > if
> > > not necessary"?  What would be an example where it's necessary?
> >
> > In general, evaluating strings as expressions is computationally
> > expensive. I can't think of any cases where I've had to use it in
> > quite a while, but I suspect there are some rare cases where you can't
> > get what you need any other way.
> >
> > That said, I wouldn't worry too much about it either way.
> >
> > Dave Watts, CTO, Fig Leaf Software
> > http://www.figleaf.com/
> >
> > Fig Leaf Software provides the highest caliber vendor-authorized
> > instruction at our training centers in Washington DC, Atlanta,
> > Chicago, Baltimore, Northern Virginia, or on-site at your location.
> > Visit http://training.figleaf.com/ for more informatio
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:320754
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to