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

RE: [matrix][cssom-view] DOMPoint, DOMPointLiteral definitions

From: Domenic Denicola <domenic@domenicdenicola.com>
Date: Fri, 27 Sep 2013 22:18:38 +0000
To: "robert@ocallahan.org" <robert@ocallahan.org>, Simon Pieters <simonp@opera.com>
CC: www-style <www-style@w3.org>, Boris Zbarsky <bzbarsky@mit.edu>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <B4AE8F4E86E26C47AC407D49872F6F9F9B25D37A@BY2PRD0510MB354.namprd05.prod.outlook.com>
Robert, I am confused what purpose the inheritance serves in your proposal. The purpose of inheritance in JS is usually to allow you to apply superclass methods (or in this case, accessor) to the base class. Indeed, that's the entire prototypal inheritance model: a "fallback" to superclass accessors.

But that does not work if your model is to *remove* permissions in the subclass; it would mean you could use the superclass's setter to mutate the supposedly-immutable subclass. So I would guess there's some kind of situation where you override every member of the superclass inside the subclass with new accessors, which contain a branding check so that you can't use the superclass's accessors on the subclass. But then that defeats the point of the inheritance! You have neither fallback nor the ability to reuse!

I am trying to understand what benefit this inheritance hierarchy has over a non-hierarchy, and simply can't see one.

Again I would urge trying to write this hierarchy in JavaScript and seeing how well it works, or doesn't. Some example code would really help clarify what you're trying to accomplish.
Received on Friday, 27 September 2013 22:19:18 UTC

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