> The IIf thing was (and presumably still is) true,
> because people typically don't actually write
> equivalent CFIF/CFSET stuff. IIf evaluates all
> of its arguments, which is an expensive
> thing to do.

In a conversation with Mike Dinowitz shortly ago, he indicated to me
that an early version of ColdFusion MX allowed him to examine the code
generated by an IIF statement and that in fact it was identical to
what most people would write as a comparable cfif statement, i.e. that
the generated code doesn't perform an evaluation, it merely writes the
variable name directly into the generated code. So if I write
iif(condition,"a","b") there would be no evaluation occurring in the
java bytecode (since it no longer generates the class files that let
him examine generated code). I gather that if you were to place
variables in those arguments, iif(condition,a,b) then it would need to
perform evaluation somewhere, although this is uncommon usage as it's
fairly rare that we actually want to use a variable to hold the name
of another variable and then putting a variable containing the name of
another variable in an IIF() would just make the whole codeblock
god-awful confusing in most cases. :) Of course, this is now third
hand information, so ...


s. isaac dealey     434.293.6201
new epoch : isn't it time for a change?

add features without fixtures with
the onTap open source framework

http://www.fusiontap.com
http://coldfusion.sys-con.com/author/4806Dealey.htm


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:237652
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to