The same thing applies to interfaces... you don't NEED them, but without them you lose that runtime type-checking safety net. The fact that CF's product manager used the term "the whole OO debate" in regards to CFC usage doesn't give me the feeling we'll be seeing the features we want anytime soon. It shouldn't be a debate, we aren't demanding that every CFC developer program in a OO fashion. We are just asking for small enhancements that would make our lives easier and our applications more robust. I think this is one area that Blue Dragon could leapfrog CFMX, and I would seriously think about switching if they did implement interfaces and null in a proper fashion.
-Dave >>> [EMAIL PROTECTED] 5/12/2005 4:03:20 PM >>> 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 On 5/12/05, Steve Bryant <[EMAIL PROTECTED]> wrote: > Why is it that you can't protect against runtime errors without a null value? > > Steve > > At 01:48 PM 5/12/2005, you wrote: > >Agreed, Brian. Also, one thing that absolutely should make it into CFCs: a > >null value. Without this, you can't protect against runtime errors. > -- Barney Boisvert [EMAIL PROTECTED] 360.319.6145 http://www.barneyb.com/ Got Gmail? I have 50 invites. ---------------------------------------------------------- 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] ---------------------------------------------------------- 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]
