Dudes... stfu evaluate can be avoided. (notice the period). .
thanks dan On Thu, Mar 19, 2009 at 9:28 PM, Gerald Guido <gerald.gu...@gmail.com>wrote: > > Opps. I posted an old version of the cfc. The new(er) one is in > cfscript.... > damn... my bad... but the offer still holds to not use evaluate. > > G! > > Note to self.... must sleep. Sleep good. > > > 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:320743 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4