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: Domenic Denicola <domenic@domenicdenicola.com>
Date: Thu, 3 Oct 2013 12:18:40 +0000
To: Tab Atkins Jr. <jackalmage@gmail.com>
CC: "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-ID: <B4AE8F4E86E26C47AC407D49872F6F9F9B2663BE@BY2PRD0510MB354.namprd05.prod.outlook.com>
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.
Received on Thursday, 3 October 2013 12:19:14 UTC

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