Makes sense.

Now that you mention it, I have run into that very issue before and found it pretty frustrating.

Steve

At 03:03 PM 5/12/2005, you wrote:
How about a function that needs to return an object that may or may
not exist.  You HAVE to declare the method as returntype="any" and
return some random thing (like the empty string) if the object is
missing.  If you could just return null, then you could leave your
returntype set to the proper object type, since 'null' fulfills the
role of any type.

Since CF is loosely typed, there's no real need for a null, since a
given value never has any type at all.  However, since MM did allow
specifying types in CFARGUMENT and the returntype attribute, you've
got a bit of a problem.  If you never specify types (proceeding with a
truly loosely typed language), you don't need null, but if you want to
use types to aid in runtime error checking, you're severely limited by
not having null.

cheers,
barneyb



---------------------------------------------------------- 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).

CFCDev is supported by New Atlanta, makers of BlueDragon
http://www.newatlanta.com/products/bluedragon/index.cfm

An archive of the CFCDev list is available at 
www.mail-archive.com/[email protected]




Reply via email to