On Wed, Oct 2, 2013 at 5:14 PM, Domenic Denicola <domenic@domenicdenicola.com> wrote: > Forking threads since I took this on a tangent... > > My preferred solution to the readonly "problem," in the pie-in-the-sky JSIDL future, would look something like this: > > ```jsidl > class Point { > get number x > get number y > > get number length > } > > class MutablePoint extends Point { > set x(ToNumber) > set y(ToNumber) > } > ``` > > Here the setters in MutablePoint do a brand check (similar to that at [1]), preventing you from applying them to Point. 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. ~TJReceived on Thursday, 3 October 2013 01:10:20 UTC
This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 17:14:18 UTC