[bitc-dev] Vectors and mutability and bears (oh my)
Jonathan S. Shapiro
shap at eros-os.org
Fri Nov 5 10:45:21 PDT 2010
On Thu, Nov 4, 2010 at 2:45 PM, Raoul Duke <raould at gmail.com> wrote:
> On Thu, Nov 4, 2010 at 2:41 PM, Jonathan S. Shapiro <shap at eros-os.org>
> > Step 1: Observe that an array (at least in BitC) is either mutable at all
> > positions or immutable at all positions. The types "array(mutable char)"
> > "mutable array(char )" are equivalent, and the hypothetical type "mutable
> > array(immutable char)" is nonsense.
> what if the array-contents-type is not a value-type?
My statement still holds. In the case of a reference type, the mutability of
the array means that the references themselves (the pointers) can be
overwritten. That is entirely separate from whether the element type permits
the *target* of the references (the payload of the object) can be
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the bitc-dev