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

Re: Figuring out easier readonly interfaces

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 3 Oct 2013 10:00:41 -0400
Message-ID: <CAOp6jLb6G=4DuuRqeH0Rg6NtMoVm7mqX9mVH=d81T=4H+f5o3Q@mail.gmail.com>
To: "Mark S. Miller" <erights@google.com>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
On Thu, Oct 3, 2013 at 9:56 AM, Mark S. Miller <erights@google.com> wrote:

> But a DOMRect is mutable by script, and so is not an LSP subtype of
> DOMRectReadOnly.
>

Is too!

-- DOMRectReadOnly: an interface exposing read-only accessors to the
> current state of a DOMRect. Nothing is said about whether the object is
> mutable or not.
>

"ReadOnly" only means you can't modify the object through the methods of
that interface. It says nothing about the mutability or otherwise of the
object. A DOMRect satisfies all the invariants of a DOMRectReadOnly and is
therefore LSP substitutable.

Perhaps this base type need a better name. Suggestions welcome.

Rob
-- 
Jtehsauts  tshaei dS,o n" Wohfy  Mdaon  yhoaus  eanuttehrotraiitny  eovni
le atrhtohu gthot sf oirng iyvoeu rs ihnesa.r"t sS?o  Whhei csha iids  teoa
stiheer :p atroa lsyazye,d  'mYaonu,r  "sGients  uapr,e  tfaokreg iyvoeunr,
'm aotr  atnod  sgaoy ,h o'mGee.t"  uTph eann dt hwea lmka'n?  gBoutt  uIp
waanndt  wyeonut  thoo mken.o w  *
*
Received on Thursday, 3 October 2013 14:01:12 UTC

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