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

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