Re: Figuring out easier readonly interfaces

On Thu, 17 Oct 2013 16:07:52 +0200, Mark S. Miller <erights@google.com>  
wrote:

>> Is the problem here that a mutable DOMRect instance has DOMRectReadOnly  
>> in
>> the prototype chain, which is a lie?
>
>
> Essentially, yes. I'm not so much concerned with implementation  
> inheritance
> as with subtyping. Inheritance is an implementation matter of the  
> providers
> of the abstractions, so whatever works is fine. Subtyping is what clients
> see. Choosing names for subtyping relationships which lie is bad.  
> Choosing
> names that seem to promise safety restrictions which they do not is
> dangerous.

OK.

I maintain that DOMRectRead looks silly. I would be OK with DOMRectView.  
Does that work?

-- 
Simon Pieters
Opera Software

Received on Thursday, 17 October 2013 14:43:23 UTC