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

Re: Figuring out easier readonly interfaces

From: Allen Wirfs-Brock <allen@wirfs-brock.com>
Date: Thu, 3 Oct 2013 20:00:22 -0700
Cc: "Robert O'Callahan" <robert@ocallahan.org>, "public-script-coord@w3.org" <public-script-coord@w3.org>
Message-Id: <00BA4AD2-FE5E-4FDA-B2DB-6C1D1F31CB7B@wirfs-brock.com>
To: Mark S. Miller <erights@google.com>

On Oct 3, 2013, at 12:33 PM, Mark S. Miller wrote:

> 
> 
> 
> On Thu, Oct 3, 2013 at 11:02 AM, Allen Wirfs-Brock <allen@wirfs-brock.com> wrote:
> 
> ...
> 
> From that perspective, I would name the most general concept:
> 
> DOMRect  -- it encompass all rectangle used by the DOM
> DOMVarRec  -- it specializes DOMRect by adding the ability to vary its coordinates.
> DOMImmutableRec  It never changes
> 
> You forgot to name the readonly one -- it specializes DOMRect by guaranteeing that its instances not provide the ability to mutate the underlying DOMRect. Given the other names, DOMRectReadOnly or DOMReadOnlyRec (did you really mean to omit the "t"?) seem like fine names for the readonly subtype.

sorry, another rushed response as the plane door closed..

I intended DOMRect to be the "read only" one. It is the most general way to use a Rectangle.  You simply use it in a "read only" and generally don't mutate it (although somebody else may have the ability).

A "writable Rectangle" is a specialization of that.  So is an absolutely immutable rectangle. 

Allen
Received on Friday, 4 October 2013 03:00:51 UTC

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