[[Class]] Property of Host Object
Allen.Wirfs-Brock at microsoft.com
Mon Jul 19 13:49:45 PDT 2010
> -----Original Message-----
> From: Mark S. Miller [mailto:erights at google.com]
> Is the following one of those cases:
> > The value of the [[Class]] internal property of a host object
> > may be any String value except one of "Arguments", "Array",
> > "Boolean", "Date", "Error", "Function", "JSON", "Math", "Number",
> > "Object", "RegExp", and "String"
Yes. As you said in an earlier message, the intent was that the host should environment should not violate specification of the nominal "types" used by the specification. But certainly, a host environment could produce such values and even management them differently as long as it doesn't violate any the semantics for that "type" that appear in the ES5 spec.
> If so, then I think we may simply have a term rotation. Everytime I say "host
> object", and AFAICT every time the spec says "host object" other than the
> definition (4.3.8), both I and it mean what you refer to above as a "non-native
> host object". Also, by your clarification above, a "native host object" seems
> indistinguishable from any other "native object", so I'm not sure what purpose
> the distinction has.
Yes, I agree. I think the main "bug" in this regard in the spec. in that the definition in 4.3.8 does not clarify this distinction. But note that 4.3.6 is quite clear that a native object is /any/ object whose semantics are fully defined by the ES5 specification and the note to 4.3.8 says that any object that is not native (ie whose semantics are not fully defined by the ES5 specification) is a host object. The only host objects that the spec. needs to explicitly talk about are host objects that are not native objects.
> In any case, we clearly have a disagreement about our memory of what we took
> these terms to mean. Anyone else who was there, care to weigh in?
Do we?? What do you think "host object" means?
More information about the es-discuss