Closed
Description
Suppose we have
type foo = tag(arm(mutable int));
The language binds identifiers in alt patterns as slots-local-to-the-case-block with value copied from the one sitting in the tag type. That is:
let foo farm = arm(5);
alt (farm) {
case (arm(x)) {
/* x is a local slot holding 5 here, assigning to
it does not change the value in farm */
x = 6;
}
}
This is possibly counterintuitive. Maybe x
should be an alias (caveat emptor: may require extra care). In any case, we probably want to support some kind of way of writing to these fields, if we are going to allow them to be marked mutable
.
Metadata
Metadata
Assignees
Labels
No labels