Which is the behavior I like. If you want to handle null values, that's for an IsNull, not an IsDefined. Even CF has the concept of "defined" even if it doesn't have null. That definition of "defined" should be intuitive and consistent. Therein lies the problem
-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Barney Boisvert Sent: Thursday, February 26, 2004 11:49 AM To: [EMAIL PROTECTED] Subject: RE: [CFCDev] Testing For [undefined struct element] I bet money that in the java code implementing isDefined(), it converts dots to .contains() calls, and catches NPEs (to handle invalid nesting), but if those pass, it doesn't follow up with a .get() != null to make sure the value isn't null. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Sean A Corfield > Sent: Thursday, February 26, 2004 5:42 AM > To: [EMAIL PROTECTED] > Subject: Re: [CFCDev] Testing For [undefined struct element] > > On Feb 25, 2004, at 9:02 PM, Roland Collins wrote: > > I understand your point, but I would still expect > > IsDefined("thing.foo") to > > return true when thing.foo = null. > > Your expectation is based on languages that have a 'null' > value - which > CF does not. > > > Think of other languages (Java seems appropriate) that _do_ have a > > concept > > of null. You can compare (thing.foo == null) for a Boolean result > > without > > generating an exception because foo does indeed exist! > > Of course - precisely because those languages have a concept of null. > Since CF doesn't have such a concept, you can't expect the same > behavior. > > I'm not arguing whether CF should have a null added, merely stating > what CF's behavior is today and explaining why that is so. > > Regards, > Sean > > ---------------------------------------------------------- > You are subscribed to cfcdev. To unsubscribe, send an email > to [EMAIL PROTECTED] with the words 'unsubscribe cfcdev' > in the message of the email. > > CFCDev is run by CFCZone (www.cfczone.org) and supported > by Mindtool, Corporation (www.mindtool.com). > > 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' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). 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' in the message of the email. CFCDev is run by CFCZone (www.cfczone.org) and supported by Mindtool, Corporation (www.mindtool.com). An archive of the CFCDev list is available at www.mail-archive.com/[EMAIL PROTECTED]