ES4 draft: Name

Erik Arvidsson erik.arvidsson at gmail.com
Mon Mar 17 17:09:15 PDT 2008


Fair enough.  On a related question, does the following allow removal
of the field?

prototype function toString(this:Namespace)
    this.intrinsic::toString()

If not these should be changed to

prototype const function toString(this:Namespace)
    this.intrinsic::toString()

for Name and Namespace.

On Mon, Mar 17, 2008 at 17:06, Lars Hansen <lhansen at adobe.com> wrote:
> I don't know if that's necessary; it follows directly from the
>  properties you mention and the fact that == and === work by
>  comparing the component fields.  (By analogy,
>  ES3 implementations already perform a fair amount of string
>  interning but I don't recall that being discussed in the ES3
>  spec.)
>
>  --lars
>
>
>
>  > -----Original Message-----
>  > From: Erik Arvidsson [mailto:erik.arvidsson at gmail.com]
>  > Sent: 17. mars 2008 17:28
>  > To: Lars Hansen
>  > Cc: es4-discuss at mozilla.org
>  > Subject: Re: ES4 draft: Name
>  >
>  > Should there be some informative text explaining that Names
>  > are immutable (non dynamic, final and only constant fields)
>  > so interning Name objects is something that might be useful
>  > for implementations?
>  >
>  > 2008/3/17 Lars Hansen <lhansen at adobe.com>:
>  > > Draft 3 of the spec for the Name class.  Changelog near the
>  > beginning.
>  > >
>  > >  The main change is that Name extends Object (not String) and that
>  > > ===,  ==, !==, and != operate not on object identity or on string
>  > > representation but directly on the (qualifier,identifier)
>  > pair.  (A
>  > > draft of an enumerability spec that justifies these changes is
>  > >  forthcoming.)
>  > >
>  > >  --lars
>  > >
>  > > _______________________________________________
>  > >  Es4-discuss mailing list
>  > >  Es4-discuss at mozilla.org
>  > >  https://mail.mozilla.org/listinfo/es4-discuss
>  > >
>  > >
>  >
>  >
>  >
>  > --
>  > erik
>  >
>



-- 
erik



More information about the Es4-discuss mailing list