Burak.Emir at epfl.ch
Thu Jun 22 04:15:48 PDT 2006
Brendan Eich wrote:
> 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.
They (erm, we) can use annotations T? and get used to it.
> 2. The difficulty of initializing variables of non-nullable type
> with a sound default value.
> It would be good to hear new counter-arguments.
ok, I saw that discussion page, I see it's not an easy decision. It's
also not easy to present hard arguments.
Having to write "proper" initialization for non-nullable types is a
price that I am willing to pay.
When trapped in my old ways Java/C# ways, I vow to write all those
additional '?' reminding myself that there might be a null lurking
Isn't it really about shifting the syntactic burden? The discussion on
default values is interesting, but does not seem too decisive in the
question of having (T? and T) vs having (T and T!)
More information about the Es4-discuss