isPropertyEnumerable is going to stay broken?
Brendan Eich
brendan at mozilla.org
Mon Sep 10 13:08:48 PDT 2007
On Sep 8, 2007, at 10:06 PM, Garrett Smith wrote:
> https://bugzilla.mozilla.org/show_bug.cgi?id=57048
>
> In this bug, dated 2000, Brendan and David agreed that
> isPropertyEnumerable should check the prototype chain.
That was a long time ago, and while David Flanagan carries a lot of
weight with many folks, he was not on ECMA TC39 TG1, and no one on
the group changed the spec.
A lot of water under the bridge since then.
> It should not backwards compatibility,
Famous last words. :-)
We try to spider the web (Alexa top 1000 and the like) looking for
counterexamples to such claims, and if we fail to find any, or
better, we find instances of confusion where the incompatible fix is
assumed (i.e., the JS author thought the spec worked the way we want
to change it to work), then we have some confidence, but not much
more, in favor of making an incompatible change. In general. In this
case, no one has done such a scan. I'll see if I can get one started.
> but such functionality in the
> language seems necessary. How to check enumerable attribute, including
> the prototype chain?
Either reflect the __proto__ (read-only, please) property as some
implementations do, or hardcode the prototype structure and code your
propertyIsEnumerable tests accordingly.
/be
More information about the Es4-discuss
mailing list