Must built-in prototypes also be valid instances? (Was: Why DataView.prototype object's [[Class]] is "Object"?)

Brendan Eich brendan at
Mon Oct 1 12:30:06 PDT 2012

Erik Arvidsson wrote:
> I'm with Allen, Andreas and others that the craziness needs to stop.

Which craziness?

class C extends B {}

C instanceof B?

That's not just in built-ins, it is in the cowpath to pave -- it's in 

class B
   p: 42

class C extends B
   q: 99
   constructor: (p, q) ->
     @p = p
     @q = q

console.log(C.prototype instanceof B)
// true


More information about the es-discuss mailing list