> -----Original Message----- > From: Hal Helms [mailto:[EMAIL PROTECTED] > Sent: Saturday, September 20, 2003 2:30 AM > To: CF-Talk > Subject: RE: Yet another OO/CFC question > > Null is actually what you're requesting with the Undefined() function. > It means exactly that. It also fulfills the type for any object, which > makes it safe to send and/or return: you won't get runtime errors. And > this isn't really just for fringe cases. Imagine the case where you have > an attribute that needs to be returned by a getter. What happens if > someone calls the getX() before setX()? You have a runtime error. If > CFCs had constructors, you could create a constructor such that one > would have to pass in X when creating the object, but as things stand, > there's no good way of eliminating the possibility of runtime errors.
Oh - I know that null is what we want - I was trying to come up with an "easy" way to obtain the concept in CF without destroying backwards compatibility. If, for example, CF suddenly made "null" a keyword and gave it null meaning there's probably lots of code that would need to be regressed/break. Even in "Discovering CFCs" (which I have in front of me during this project, thanks!) you use the string "null" to represent the concept. I'm not sure of that code would break is true null was introduced but it would be confusing. However if a new function was created that generated an "internal null" it could be assigned to variables and used in tests without risk to older code. Perhaps to be more clear the function could be just called "null()". I may be wrong-headed in this (it was just brainstorming) but that was idea (I actually "get" null). Of course I suppose that the "real" null could be added to CF and a special <CFPROCESSINGDIRECTIVE> attribute issued to control whether it's used or not. ;^) Jim Davis ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Message: http://www.houseoffusion.com/lists.cfm?link=i:4:137800 Archives: http://www.houseoffusion.com/lists.cfm?link=t:4 Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4 Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm

