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

Re: JSIDL ideas for read only (Was: RE: Figuring out easier readonly interfaces)

From: Tab Atkins Jr. <jackalmage@gmail.com>
Date: Thu, 3 Oct 2013 10:16:59 -0700
Message-ID: <CAAWBYDB0b2qKLHWF4bV-wdPSpMf+xnwub5dtkc39OFohm+9GCg@mail.gmail.com>
To: Domenic Denicola <domenic@domenicdenicola.com>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
On Thu, Oct 3, 2013 at 5:18 AM, Domenic Denicola
<domenic@domenicdenicola.com> wrote:
> From: Tab Atkins Jr. [mailto:jackalmage@gmail.com]
>> This is precisely the "two interfaces" problem, though.  If I want to extend Point in the future, I need to remember to put a getter on Point and a setter on MutablePoint.  That's a maintenance hazard I was trying to avoid.
> I don't see a way to avoid this, though. There may be some properties you want to make mutable in the subclass, but not all of them (e.g. not `length`). You'll need to explicitly enumerate what aspects of the class become mutable in the subclass, and doing so with getter declarations seems nice.

Right, but we can already write something like this in WebIDL, so this
isn't gaining us anything.  And I'm explicitly trying to find a
solution that results in a single interface, with some way for the
implementation to detect that it's readonly.

But I can't think of any way to do it that actually works. :/

Received on Thursday, 3 October 2013 17:17:46 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:18 UTC