questions on nullability

Jeff Dyer jodyer at
Thu Jun 15 14:19:45 PDT 2006

Lars T Hansen wrote:

> But I don't recall it being discussed.

It was discussed briefly. Two reasons mentioned were compatibility with
existing implementations (e.g. AS3) and expectations of users familiar
with mainstream object oriented languages.


-----Original Message-----
From: es4-discuss-admin at
[mailto:es4-discuss-admin at] On Behalf Of Lars T Hansen
Sent: Thursday, June 15, 2006 2:05 PM
To: P T Withington
Cc: es4-discuss at
Subject: Re: questions on nullability

On Thu, 15 Jun 2006 21:31:58 +0200, P T Withington <ptw at>

>> From: Lars T Hansen <lth at>
>> Date: 15 June 2006 05:26:57 EDT
> [...]
>> The entire reason that the class definition can be annotated is to
>> make it easier for the programmer not to have to worry about null
>> using classes for which a null value does not make sense.
> Hi Lars,
> Just curious why the default is to permit null.  Seems to me that it
> is more common for it _not_ to make sense for a type to include the
> null value.  Is it just that that would be too great a departure from
> Javascript 1?
> [Just getting up to speed on this project, great to see you on it!]

Hi Tucker,

backwards compatibility is probably constraining us here, though classes
are new in 4th Edition so it's possible that non-nullable could be the
default for class instances.  In practice I suspect it may be confusing,
and I also suspect that most object structures are recursive in some way
and will want nullable types.  But I don't recall it being discussed.

Es4-discuss mailing list
Es4-discuss at

More information about the Es4-discuss mailing list