On Tue, Sep 8, 2009 at 1:51 PM, Matthew Woodward<[email protected]> wrote:
> Only if you define "correct" as "whatever Adobe CF does."
Well, that's a compatibility choice each engine has to make.
> Null doesn't mean something doesn't exist
That's what it has meant in CFML since CFMX6.0 - feel free to try it
out. At Railo we've run into enough code that relies on this that
we've gone to quite a bit of effort to be compatible with Adobe
ColdFusion in this area. In fact we recently ran into a new variant of
this issue and, again, made changes to be compatible with Adobe so
that the third party code in question would run unaltered on both
Adobe and Railo. Sometimes what we do is provide an administrator
setting for compatibility vs performance if being compatible means
being slower.
ColdSpring's AOP relies on this behavior BTW and I've seen other code
that does stuff like:
<cfset result = someFunctionCall() />
<cfif isDefined('result')>
...
</cfif>
Again, because someFunctionCall() might not return a value (or might
return null) and thus the result variable gets a value of null and so
isDefined() yields false on it when it has a null value. FWIW,
ColdFusion 9 completely enshrines this behavior in the language
because of the way they've implemented isNull() so expect to see more
of this sort of code...
--
Sean A Corfield -- (904) 302-SEAN
Railo Technologies US -- http://getrailo.com/
An Architect's View -- http://corfield.org/
"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood
--~--~---------~--~----~------------~-------~--~----~
Open BlueDragon Public Mailing List
http://groups.google.com/group/openbd?hl=en
official site @ http://www.openbluedragon.org/
!! save a network - trim replies before posting !!
-~----------~----~----~----~------~----~------~--~---