ES4 draft: Object

Yuh-Ruey Chen maian330 at gmail.com
Tue Mar 11 08:43:07 PDT 2008


Peter Hall wrote:
> Yuh-Ruey Chen <maian330 at gmail.com> wrote:
> >  Which gets me back to the cognitive load issue. Even with a name like
> >  'hidden', they may think they may have to do some funky syntax like
> >  |obj.hidden::other_ns::prop| do hide a prop in another namespace.
>
>
> This was confusing me... How would you define a property to have a
> qualified name and be in the dontenum namespace at the same time? Or
> are namespaced properties non-enumerable anyway? (That would feel
> wrong to me..)
>   

The latter. It is weird, I agree. But the enumerator can easily be 
customized, so I want the default enumerator be as non-magical as 
possible - and therefore, as simple as possible. In fact, I'm a bit 
bothered that propertyIsEnumerable is a method of Object yet can be 
rendered useless when changing the enumerator - along this line of 
reasoning, one would think that such a specific method shouldn't be a 
method of Object at all, but rather the enumerator itself.

> ES4
> doesn't currently have a way to express AND/OR namespace combinations.
>   

Yeah, I vaguely remember some discussion concerning multiple namespaces 
per property a long time ago (maybe a year ago). It was rejected 
probably due to complexity.

-Yuh-Ruey Chen



More information about the Es4-discuss mailing list