ES4 draft: Object

Lars Hansen lhansen at adobe.com
Sat Mar 8 12:22:23 PST 2008


> -----Original Message-----
> From: es4-discuss-bounces at mozilla.org 
> [mailto:es4-discuss-bounces at mozilla.org] On Behalf Of P T Withington
> Sent: 8. mars 2008 10:10
> To: Brendan Eich
> Cc: zwetan; es4-discuss at mozilla.org es4-discuss; Yuh-Ruey 
> Chen; Erik Arvidsson
> Subject: Re: ES4 draft: Object
> 
> On 2008-03-07, at 22:43 EST, Brendan Eich wrote:
> 
> > The goal is to find the minimum amount of mutating meta-programming 
> > sharpness for this "make certain properties non-enumerable" 
> tool. If 
> > it can be done with a one-time namespace qualification step, that 
> > wins.
> 
> A few comments:
> 
> I am confused.  I guess I thought everything was in a 
> namespace, just that there is a default namespace that things 
> with no explicit namespace are in.  Which makes me wonder how 
> the namespace/not- enumerable proposal will really work.

Some namespaces are "public" and distinguished thereby, properties
in these namespaces would be enumerated.  One of the public 
namespaces is the default namespace that things with no explicit
namespace are in.  (We're still fine-tuning the details of that.)

> Finally, for debugging, I would want to be able to find all 
> the properties of an object, non-enumerable and fixtures 
> included.  Will there be a way to introspect like that?

Not certain yet.  Being able to "just do it" is a security 
concern if you think namespaces are in part about hiding access
to private data.  (Debugging facilities in the language are
not a good idea if there is any chance at all that some of the
code in a program may be hostile.  We have to make a choice
about that when we write the spec for the reflection mechanism.)

--lars



More information about the Es4-discuss mailing list