[[Class]] and host objects

Waldemar Horwat waldemar at google.com
Mon Feb 9 18:29:56 PST 2009

Brendan Eich wrote:
>> I’ve tried various formulation of a simple statement about host 
>> objects but I keep finding potential holes and coming back to the 
>> conclusion that the only meaningful thing to do is to explicitly 
>> enumerable the invariants associated with each predefined [[Class]] 
>> value.  Does anybody have a simpler solution?  Does anybody want to 
>> volunteer to identify the invariants?
> I think Chapter 15 already does identify the invariants, but you're 
> right that multiple globals are not specified. In a single-global 
> embedding, I would want any host [[Class]] == "Array" impostor to create 
> instances whose prototype was Array.prototype, though. Wouldn't you?

Not necessarily.  Array.prototype could be further up the prototype chain, or perhaps they could share a common prototype that constitutes a more generic kind of arrayness than Array.

As you guys mentioned, the bigger question is what to do about multiple global objects.  That's the issue in reality and we shouldn't add anything to the spec that would be inconsistent with that reality.


More information about the Es-discuss mailing list