ES4 draft: Object

Lars Hansen lhansen at adobe.com
Wed Mar 5 17:25:37 PST 2008


> -----Original Message-----
> From: Erik Arvidsson [mailto:erik.arvidsson at gmail.com] 
> Sent: 5. mars 2008 17:04
> To: Lars Hansen
> Cc: es4-discuss at mozilla.org
> Subject: Re: ES4 draft: Object
> 
> We (Google) find setting the [[DontEnum]] flag with 
> propertyIsEnumerable(name, flag) to be quite ugly.

Can't argue with that.

> I can't 
> find any references to why the setter was tagged along onto 
> the getter in this way?  Is there a reason why we don't want 
> setPropertyIsEnumerable(name, flag) instead of overloading the getter?

It was felt, and I think it is still felt, that it is dangerous
to introduce new names on the Object prototype, because the
risk of clashes with code on the web is too great.  As the problem
that is solved by the overloading is really worth solving, the
ugliness of the solution seemed to be acceptable.

--lars

> 
> 2008/3/5 Lars Hansen <lhansen at adobe.com>:
> > This is the draft for the Object class.  It's very similar to the 
> > Object  object in ES3, the only addition (to my knowledge) is the 
> > extra  parameter to propertyIsEnumerable.  And of course the 
> > specification  formalism is new.
> >
> >  Please comment.
> >
> >  --lars
> >
> > _______________________________________________
> >  Es4-discuss mailing list
> >  Es4-discuss at mozilla.org
> >  https://mail.mozilla.org/listinfo/es4-discuss
> >
> >
> 
> 
> 
> --
> erik
> 



More information about the Es4-discuss mailing list