isPropertyEnumerable is going to stay broken?

Brendan Eich brendan at mozilla.org
Mon Sep 10 13:28:45 PDT 2007


On Sep 10, 2007, at 1:21 PM, liorean wrote:

> On 10/09/2007, Brendan Eich <brendan at mozilla.org> wrote:
>> Either reflect the __proto__ (read-only, please) property as some
>> implementations do, or hardcode the prototype structure and code your
>> propertyIsEnumerable tests accordingly.
>
> Would it be possible to add an optional boolean parameter for
> searching including the whole prototype chain, so that we get a
> mechanism to do this that doesn't depend on implementation specifics

The alternative above would standardize read-only __proto__, which  
would make that property no longer implementation-specific. But of  
course we have no proposal to do that.

> or code structure?

Adding another optional argument to propertyIsEnumerable is ugly,  
since ES4 has a long-standing proposal to add an optional boolean  
parameter for changing enumerability. Two trailing optional  
parameters, without named parameters, poses usability (both when  
writing code and reading it) hazards. Over-engineering with one  
optional object parameter, supporting "keyword" properties, seems bad  
too -- we want propertyIsEnumerable to remain simple, with few  
arguments in toto.

Is the ES3 behavior a true usability problem in the field, or more of  
a discordant spec glitch that we can live with?

/be




More information about the Es4-discuss mailing list