[bitc-dev] Vectors and mutability and bears (oh my)

Ben Kloosterman bklooste at gmail.com
Wed Nov 3 19:03:35 PDT 2010

My 2c 


Agree vectors should not be a  primitive type..they are just a collection
which may use an underlying array ( or even linked list) , speaking of which
do we support  user defined index like properties  on structs /objects  ?  


And yes mutability  here is meaningless. 


>One other point while I'm stirring the pot here: a non-mutable vector is an
example of a mutability constraint that is neither fully shallow nor fully
transitive. The elements may be immutable, but they may be references to
objects that *are* in turn mutable. This takes us head on into challenging
territory that we have visited (unsatisfactorily) before: how to state the
scope (coverage?) of contract in an object graph? Alternatively, how to
capture the relationship between the programmer notion of "object" as a
coherent functional unit, and the runtime notion of object as a collection
of primitive data structures.


Has anyone solved this  it comes up time and time again even in programming
?  Basically if any part of the structure is mutable than the whole
structure is mutable.    The only way I know is to ensure immutability is to
use types or wrappers of types that are immutable



-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.coyotos.org/pipermail/bitc-dev/attachments/20101104/09305613/attachment.html 

More information about the bitc-dev mailing list