[[DefineOwnProperty]] wording nit
jason.orendorff at gmail.com
Thu Sep 17 12:15:49 PDT 2009
On Sat, Sep 12, 2009 at 5:08 AM, Jeff Walden <jwalden+es at mit.edu> wrote:
> "If a field is absent then the result of any test of its value is logically
> I believe there are two plausible ways to interpret this: any evaluation of
> desc.[[Something]] when there is no [[Something]] field returns the value
> false, or the result of any comparison which evaluates desc.[[Something]]
> must be false.
The second is certainly not how I would have interpreted it cold. It
doesn't seem like a reasonable interpretation of the text.
> The difference shows up in step 7b, whose wording is:
> "Reject, if the [[Enumerable]] fields of current and Desc are the Boolean
> negation of each other."
> Under the first interpretation, if there is no [[Enumerable]] field in Desc,
> then never Reject.
> Under the second interpretation, if there is no [[Enumerable]] field in
> Desc, *and* if current.[[Enumerable]] is true, then Reject.
I think you have the two interpretations reversed here; under the
second interpretation (the one that doesn't seem reasonable to me), if
[[Enumerable]] is missing, we never Reject.
> Past email to this list makes clear the first interpretation was the desired
(assuming you mean the second interpretation)
Yow. This is very unintuitive. To me, the spec seems to say the
opposite of what's intended here.
Perhaps modifying step 7b to explicitly say "Reject, if [[Enumerable]]
is present in Desc and...", is a less arcane approach to fixing this.
(That might not be the only change needed though.)
More information about the es-discuss