Re: Figuring out easier readonly interfaces

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. Either we think that a fully mutable object can never be 
a subclass of a readonly/view/whatever object or we don't. 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.

Received on Thursday, 17 October 2013 19:36:30 UTC