Re: Figuring out easier readonly interfaces

On 10/2/13 9:08 PM, Mark S. Miller wrote:
> If Foo is a subtype of Bar and you pass a Bar to a function that takes a
> Foo, what should happen?

Probably an exception, in general.

> I ask because Foo is a almost an LSP subtype of readonly<Foo>. The LSP
> common supertype of Foo and readonly<Foo> has exactly the signature of
> readonly<Foo>.

Agreed.  So we may end up wanting to declare readonly<Foo> arguments.

-Boris

Received on Thursday, 3 October 2013 01:11:57 UTC