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

Re: How to specify an object that can be mutable or immutable

From: Robert O'Callahan <robert@ocallahan.org>
Date: Thu, 26 Sep 2013 23:13:14 +1200
Message-ID: <CAOp6jLbS-a4jAb82q784jn_FvCoW7AqM_Je2AFXW0-k_MZtgxw@mail.gmail.com>
To: public-script-coord@w3.org
Immutability and read-only are different. An immutable object is one that
is guaranteed to not change. In your case, a DOMRectReadOnly can change ---
if it's actually a DOMRect. You just can't change it through the
DOMRectReadOnly interface.

This would be more clear if we called it DOMRectImmutable; it would be odd
to have DOMRect extend DOMRectImmutable, because a DOMRect isn't immutable.

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, 26 September 2013 11:13:42 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:37:50 UTC