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

Re: Figuring out easier readonly interfaces

From: Mark S. Miller <erights@google.com>
Date: Thu, 17 Oct 2013 13:38:20 -0700
Message-ID: <CABHxS9iC5Qbq4mmnkXazdSGEXZckEjxTy55yf+TZhSqPDWxzkg@mail.gmail.com>
To: James Graham <james@hoppipolla.co.uk>
Cc: "public-script-coord@w3.org" <public-script-coord@w3.org>
On Thu, Oct 17, 2013 at 12:36 PM, James Graham <james@hoppipolla.co.uk>wrote:

> On 17/10/13 19:22, Mark S. Miller wrote:
>
>  In a quick skim of these I did not find anything that contradicts the
>> view that a read-only object implies the inability to modify the
>> underlying state *via that object*. But there's a lot of text there and
>> searching for "who" didn't find anything. Where do these APIs violate
>> the LSP interpretation of read-only?
>>
>
> I don't see how changing the name can possibly change whether the LSP is
> being violated.


LSP depends on what the contract is.



> Either we think that a fully mutable object can never be a subclass of a
> readonly/view/whatever object or we don't.


Let's take a subset of that claim:

"Either we think that a fully mutable object can never be a subclass of a
whatever object or we don't."

Well, which do you think? Doesn't it depend of what "whatever" is?



> Whether one believes that seems to depend on whether you think the missing
> setters form part of the contract that must be preserved for subclasses.
>

Exactly.



-- 
    Cheers,
    --MarkM
Received on Thursday, 17 October 2013 20:38:47 UTC

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