3 ms·
Yes, there's clearly an ambiguity in section 2 with regards to internal properties. Looking at "Internal Properties and Methods" section (8.6.2), you can see t
by kangax 17y ago
Yes, there's clearly an ambiguity in section 2 with regards to internal properties.
Looking at "Internal Properties and Methods" section (8.6.2), you can see that specification makes it pretty clear that, for example, host objects' behavior is completely implementation-dependent: host objects are allowed to "spoof" [[Class]] values (which they, in fact, do in real life); that [[DefaultValue]] can go as far as throwing an error; that [[Get]], [[Put]] and [[HasProperty]] do not have to necessarily match; and that they don't have to implement any or all of the internal methods at all.
But that's host objects, and we are talking about built-ins, so there's no proof there.
I guess my point is that specs usually tend to state important things explicitly (using somewhat unambiguous keywords like "must" or "should"). You can see it in that same 8.6.2 section:
| Every object (including host objects) must implement the
| [[Prototype]] and [[Class]] properties and the [[Get]],
| [[Put]], [[CanPut]], [[HasProperty]], [[Delete]], and
| [[DefaultValue]] methods.
Might be worth bringing this up on es-discuss/es5-discuss mailing lists.