[bitc-dev] on mutable types

Sam Mason sam at samason.me.uk
Sat May 20 02:48:36 EDT 2006


On Sat, May 20, 2006 at 01:26:05AM -0400, Swaroop Sridhar wrote:
> No extra level of indirection is introduced. The mutable keyword 
> qualifies the type of an expression, allowing it to be mutated.

OK, but in that case the spec sounds a little confused to me.
In the section about make-vector it says, of a (vector uint32), that
"The vector created ...  will contain immutable copies of the value"
(it actually misses the example code demonstrating it, but never mind).
It then goes on to say, of a (vector (mutable uint32)), that it "creates
a vector ... each cell of which contains a mutable pointer".

The thread titled "Type compatibility at application" seemed to confirm
my suspicions about this issue, but I've reread it and I think I was
just misinterpreting what the problem was.

I guess that formalising the semantics would be helpful, but I'm not
remotely experienced in doing this and tend to work in a much more
ad-hoc manner.  I'll try and think about it a bit more.


  Sam


More information about the bitc-dev mailing list