On Wed, 2008-08-20 at 17:24 -0400, Swaroop Sridhar wrote:
> In the case of defunion, should the union itself be mutable only if all
> shallow fields in all legs are mutable?

Yes. This must be the case, because we cannot know which leg we will be
handed. However, we exclude the tag value for this purpose, since that
field isn't really visible in any case.

> The present rule (which says that the union is mutable if all
> constructors only have mutable fields) might not be too bad in practice.
> But, it seems unintuitive since it creates an artificial relation
> between the mutually exclusive constructor legs.

I tend to agree, but I can't generate any other sensible
interpretation...

Oh. Urk. I now see the problem, I agree that it is quite nasty, and I
need to think about it. Unfortunately I am already 30 minutes late
leaving for home, so I cannot do that right now.


shap

_______________________________________________
bitc-dev mailing list
[email protected]
http://www.coyotos.org/mailman/listinfo/bitc-dev

Reply via email to