Controlling DontEnum (was: ES4 draft: Object)

Lars Hansen lhansen at adobe.com
Thu Mar 13 14:21:07 PDT 2008


This feels like convergence.  I'll hook this into the RI and
write it up in the next couple of days (barring further 
discussion, of course).

--lars 

> -----Original Message-----
> From: Brendan Eich [mailto:brendan at mozilla.org] 
> Sent: 13. mars 2008 15:17
> To: Lars Hansen
> Cc: Neil Mix; es4-discuss at mozilla.org
> Subject: Re: Controlling DontEnum (was: ES4 draft: Object)
> 
> On Mar 13, 2008, at 2:07 PM, Lars Hansen wrote:
> 
> >> -----Original Message-----
> >> From: Neil Mix [mailto:nmix at pandora.com]
> >>
> >> function __createProperty__(name:EnumerableId,
> >>                              value:*,
> >>                              enumerable:boolean=true,
> >>                              removable:boolean=true,
> >>                              writable:boolean=true): void
> >>
> >> Or some reasonable variant therein?  I have no strong 
> opinions on the 
> >> form the parameters eventually take, but trying to parse what 
> >> dontenum=false means tends to give me headaches. ;)
> >
> > Well, it had to come up at some point ;)
> >
> > I suspect what you're proposing is the better UI.  
> Obviously JS1/ES3 
> > shows a bias for enumerable, removable, writable properties -- the 
> > attribute bits flag exceptions from the general rule.  The more 
> > general design has attribute bits that simply control those 
> property 
> > aspects, and the less biased names feel like an improvement.
> >
> > Brendan, opinions?
> 
> Neil's names are much better. For the record, I didn't come 
> up with DontDelete and DontEnum in ES1 daze. SpiderMonkey 
> internally uses PERMANENT for the former and ENUMERATE for 
> the inverse of the latter (since the native-biased API finds 
> callers wanting enumerable pre- defined properties to be the 
> exception).
> 
> /be
> 
> 



More information about the Es4-discuss mailing list