W3C home > Mailing lists > Public > public-script-coord@w3.org > July to September 2013

Re: Maybe we should think about Interface.isInterface functions again

From: Boris Zbarsky <bzbarsky@MIT.EDU>
Date: Sat, 20 Jul 2013 22:39:34 -0400
Message-ID: <51EB49E6.6030507@mit.edu>
To: Domenic Denicola <domenic@domenicdenicola.com>
CC: Anne van Kesteren <annevk@annevk.nl>, Travis Leithead <travis.leithead@microsoft.com>, "public-script-coord@w3.org" <public-script-coord@w3.org>
On 7/20/13 4:54 PM, Domenic Denicola wrote:
> But, I still think phrasing this in terms of "is a node" vs. "isn't a node" isn't the right way to think about it.

I'd like to understand why not, in this particular context...

> To go back to our favorite prototypical inheritance examples, Dog.prototype is definitely an Animal

But that's just not the case in the DOM....  Node.prototype is 
definitely not a Node.

It's not even necessarily true for built-in ES objects in ES6: 
Map.prototype is not in fact a Map.  And for that matter, even 
Date.prototype and Array.prototype, which in ES5 are in fact Date and 
Array objects respectively are no longer that in the ES6 drafts.

> Is there a natural, useful domain concept that is struggling to get out?

"is a node"?  ;)

> Something like "can be used within a document" or "can be used within this specific document"?

No, those don't capture all the differences between Node.prototype and 
an actual Node object...

-Boris
Received on Sunday, 21 July 2013 02:40:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:50 UTC