On Tue, Dec 23, 2014 at 6:46 PM, Jonathan S. Shapiro <[email protected]> wrote:
> READONLY <: MUTABLE
> READONLY <: IMMUTABLE
>
> REF READONLY <: REF MUTABLE  (as expected)
>
> REF READONLY <: REF IMMUTABLE (as expected)
>
>
> We can only pass a [shallow] MUTABLE to an IMMUTABLE parameter because they
> are copy compatible.
>
> And then we have:
>
> DEEP READONLY <: DEEP IMMUTABLE
>
> DEEP READONLY <: DEEP MUTABLE
> DEEP READONLY <: READONLY
>
> DEEP READONLY <: IMMUTABLE
> DEEP READONLY <: MUTABLE
>
>
> This stuff is tricky. There are a lot of things we might be tempted to
> justify by subtyping that are actually justified by copy compatibility.

What is the difference, in BitC? Are there any considerations for copy
compatibility besides subtyping and mutability? And the "copy" in
"copy compatibility" means shallow copy, right? After all, we can deep
copy to any mutability type we want, I'd think.
_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to