<cfset theValue = evaluate('form.' & fieldName) />
instead of
<cfset theValue = form[fieldName] />
knowing full well that the first one is almost guaranteed to be less efficient (not to mention harder to read), then that's just plain wrong.
I don't like this point (and I'm really not trying to single out Brian at all – this is just the point where I felt like chiming into the conversation). Yes evaluate() is slow, but because someone uses "feature A" instead of "feature B" of a language, I disagree that it always is because of a lack of understanding of features.
I've written apps in the past, and in keeping with the "make it work now, make it fast later" ideals (which sometimes have to be followed, depending on your work environment and schedule…Doug are you out there? Back me up here! :) ), I will write code in the first way I can think of that gets the job done. Sometimes things are out of my control, and I _have_ to wait for version 2 before I can go in and remove calls to evaluate(), and other poorly/quickly written sections of code. And if I'm writing a library that I need to get _working_ now, I know there are spots that I've used evaluate() to get something done.
Everything has it's place…
----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to [email protected] with the words 'unsubscribe cfcdev' as the subject of the email.
CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting (www.cfxhosting.com).
An archive of the CFCDev list is available at www.mail-archive.com/[email protected]
