specs of internal methods like [[Get]] in ES3 and ES4

Peter Michaux petermichaux at gmail.com
Sun Dec 16 21:40:49 PST 2007

On Usenet's comp.lang.javascript there has been a discussion about the
internal methods like [[Get]] in the ES3 spec.

I think the ES3 spec is contradictory. Section 8.6.2 starts by
stressing the internal methods are "purely for expository purposes"
and that an "implementation of ECMAScript must behave as if it
produced and operate on internal properties...". To me this clearly
implies that the internals of the implementation can be coded any way
the implementor wishes to. Then later, in the same section, the spec
says that "Every object (including host objects) must implement
[[Prototype]] and [[Class]] properties and the [[Get]]...methods."
This seems like a contradiction because even though the implementation
must only behave as though it implements [[Get]], the implementation
must also actually have [[Get]]. My interpretation is that the spec
writers intended to write "Every object (including host objects) must
behave as though it implements [[Prototype]] and [[Class]] properties
and the [[Get]]...methods." That would be more consistent with the
first part of 8.6.2.

I bring this up on the ES4 list partly to find out if my
interpretation is correct but also to say at least one person is
confused by this and hopefully the writing of the ES4 spec will be a
bit clearer in this respect.


More information about the Es4-discuss mailing list