On Mon, Oct 1, 2012 at 4:04 PM, Brendan Eich <[email protected]> wrote:
> Rick Waldron wrote: > > On Mon, Oct 1, 2012 at 3:21 PM, Brendan Eich <[email protected]<mailto: >> [email protected]>> wrote: >> >> Andreas Rossberg wrote: >> >> Er, from my reading that's clearly not what the Wiki says for >> WeakMap. And it also is not what V8 implements, for either >> WeakMap or Map. >> >> >> Sorry, I was relying on Rick's testimony that the answers were 1) >> yes, 2) no. >> >> >> >> Yes, when I first considered the topic, it seemed to make some kind of >> sense (based on a desire for consistency), but I also don't believe that >> should be the case now—I even noted that I had always subjectively viewed >> resulting behaviours as "strange". >> > > Oops, then I really misread one of your messages -- I thought you had > tested in V8. > > I did, via node, but I was showing Array, not Map—Erik showed Map, which is the built-in "that disagrees" :) > > I'm not sure I've ever encountered code in the wild that made any >> intentional use of built-ins Foo.prototype-as-firstborn - can anyone on the >> list point to some compelling use cases? >> > > If it doesn't matter, we could make all the built-ins' > constructor.prototype objects be instances of Object (except for the Error > subclasses!). > Is there any way to confirm? Rick > > That would be nice. Then we'd have > > class C extends B {} > assert(C.prototype instanceof B) > > and per Allen's nifty trick of avoiding class-side inheritance from Object > (which made Dave hear angels sing): > > class C {} > assert(C.prototype instanceof Object) > > > /be >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

