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

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