Nullablity

Brendan Eich brendan at mozilla.org
Wed Jun 21 09:10:58 PDT 2006


I'm sympathetic to this "don't make implicit option types by making  
class types nullable" argument -- I made it in TG1 meetings a while  
ago.  But before that, waldemar's drafts and the derived JScript.NET  
and ActionScript languages made class types nullable by fiat.  This  
was not just a bad precedent.  Nullability for class type has two  
independent arguments:

1.  Mindshare from Java, C#, and other languages that include null  
among the values of reference types.

2.   The difficulty of initializing variables of non-nullable type  
with a sound default value.

It would be good to hear new counter-arguments.

/be

On Jun 21, 2006, at 11:42 AM, John Cowan wrote:

> Shijun He scripsit:
>
>> What I expect is straightforward. When I say a:T, I mean non- 
>> nullable,
>> when I say a:T?, I mean nullable. When I see a:T, I know it's
>> non-nullable, when I see a:T?, I know it's nullable.
>
> +1
>
> -- 
> A mosquito cried out in his pain,               John Cowan
> "A chemist has poisoned my brain!"              http://www.ccil.org/ 
> ~cowan
>         The cause of his sorrow                 cowan at ccil.org
>         Was para-dichloro-
> Diphenyltrichloroethane.                                (aka DDT)
> _______________________________________________
> Es4-discuss mailing list
> Es4-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es4-discuss




More information about the Es4-discuss mailing list