huh? If you had returntype="null", you might as well use
returntype="void". The point of null is to allow a method to return a
value that is not only "nothing", but also satisfies the method's
signature. This would be very helpful for getters/setters that return
primitive types like numeric, string, and date.

While CF's loose typing can come in handy, it also can be quite annoying
when building large, complex applications... especially when there are
multiple developers and part of the communication process is "in the
code". It's hard to say you support adding interfaces but don't want
strong-typing "features" in the language... that's a huge contradiction.
Also, these are runtime features we are asking for, not "compiletime".

-Dave

>>> [EMAIL PROTECTED] 05/12/05 7:45 PM >>>
Barney...

I get your point, but I wonder... and prepare yourself for YACFOOWA (yet

another cf-oo work-around).

Why note just have a CFC called... null.cfc. If you need a standard, 
consistent value to test against perhaps expecting the language to
provide 
it by default isn't always the answer.

If you had a null.cfc, you could actually USE type="null" or 
returntype="null" in your CFC code. I'm not sure I understand the need
for 
making CF into something that it isn't, wasn't, and really probably
never 
will be. I can see adding interfaces being as easy as adding an 
implements="" attribute to a CFC... but adding types to a loosely typed 
language strikes me as an odd fix to a non-problem.

Maybe I'm missing something... if so, please point it out. I just see
many 
of these things that people are calling "deficits" as part-and-parcel to
the 
strength and core values of the language: flexibility and a focus on
runtime 
over compiletime.

Just my two cents since we're on the topic.

Laterz!

J

On 5/12/05, Barney Boisvert <[EMAIL PROTECTED]> wrote:
> 
> > In many instances, allowing functions to return null values just
shifts 
> the
> > problem or, at least, the responsibility. This is why we so many
null
> > pointer exceptions from Java and C#. They are proper OO languages 
> returning
> > null values that the consumer is unprepared to handle.
> 
> I HAVE to respond this statement. Having or not having null doesn't
> affect this issue at all. If i have null, I return it. If I don't
> have null, I return "something" (like the empty string). In either
> case, the calling code needs to be able to handle both scenarios.
> Having null makes this easier, because you have a specific value to
> test against, and more importantly, it's a value that cannot be
> confused with any other value.
> 
> 


-- 
---------------
-------------------------------------
Buy SQLSurveyor!
http://www.web-relevant.com/sqlsurveyor
Never make your developers open Enterprise Manager again.



----------------------------------------------------------
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]


Reply via email to