questions on nullability

Peter Hall peterjoel at gmail.com
Fri Jun 16 14:21:17 PDT 2006


It is (see http://developer.mozilla.org/es4/spec/chapter_6_types.html), but
I don't know if the type Null (as opposed to value null) is addressable. It
isn't in AS3. Since the Null type has only one member, there are currently
no occasions where you would need it.

Peter


On 6/16/06, Nicolas Cannasse <ncannasse at motion-twin.com> wrote:
>
> > At the risk of being tangential, is there any value in generalising the
> > nullability concept into a pseudo type, which may be defined as the
> > union of some set of types, with a further set of types removed?
> >
> > Re-using the + and - operators, it could be something like:
> >
> > function add(a:(Number+Complex-Null), b:(Number+Complex-Null)):Complex{
> >   if(a is Number){
> >      a = new Complex(a, 0);
> >   }
> >   return a.add(b);
> > }
>
> As far as I know, "null" is a value, not a type.
>
> Nicolas
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.mozilla.org/pipermail/es-discuss/attachments/20060616/daf92590/attachment.html 


More information about the Es4-discuss mailing list