On 24 March 2011 08:56, Jonathan S. Shapiro <[email protected]> wrote: > struct S > is > const i : int32 > const next nullable S > > boxed struct Container > is > mutable s : S;
> def f() > in > let container = Container(S(5, null)) > chain = S(4, container.s) This is a copy, right? Which doesn't seem to suffer from the problem you are trying to expose, but I think I can see what you mean. I can take a reference to the target of $container.s$, and thus have a reference to an immutable structure, and yet I can't talk about the purity of the target in any way, because it depends on the mutability of the path where it is stored, not the mutability of the object referred to - information which does not appear in the type of the reference I have. That is a tricky one. Besides adding this information (the purity of the object referenced) to the type of all references, I wonder if there are other solutions that also don't sound completely arbitrary. -- William Leslie _______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
