BitC 0.10 suffers some confusion about the term "const". For reference
types, it fails to distinguish between a constant field *containing* a
reference and a reference to constant data. This is a fairly minor
annoyance, but one that we need to clean up.

For our notion of "const", BitC 0.10 chose to implement a notion of
immutability rather than a notion of read-only references. I continue to
believe that deep immutability is a good notion, but I think we neglected
something important from the standpoint of interoperability: const-by-alias
is a crucial part of the type systems of languages that we need to call, so
we need the ability to express this notion in our type system. From a typing
perspective, doing "deep read-only" and "shallow read-only" references isn't
that big a leap.

So here are the questions:

   - Should we retain the notion of deep immutability? Is there a use-case?
   - If so, should we retain it in its current form (inferrable constructive
   immutability) or as a liveness property (cross-grade performed at a
   known-exclusive reference)? The latter permits cyclic immutable structures.

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

Reply via email to