[MLton-devel] Minimizing space usage in ML (fwd)

Stephen Weeks MLton@mlton.org
Tue, 22 Oct 2002 13:52:16 -0700


> Isn't the information (about mutability) a bit tricky because of things like
> Vector do assignments after the object is created?  I looked at the source
> and didn't see any cast, which I thought would be there.

Yes it is tricky.  There are conversions from arrays to vectors in the
basis library.  See Primitive.Vector.fromArray from and its uses,
e.g. in the Sequence functor.

I guess if we are going to do this, Primitive.Vector.fromArray should
not be a noop, it should actually change the header word of the
object, marking it as immutable.  Of course, the SML type system
doesn't check that we get it right, but we already suffer from that
problem.


-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ad.doubleclick.net/clk;4699841;7576301;v?http://www.sun.com/javavote
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel