> Type "'a node" is immutable from the outside. However, exploiting the
> undocumented (good reason for this ;-) type casting features of OCaml,
> one can cheat and define an identical type within a local module -
> which is mutable!
This certainly suggests to allow the export of an immutable view of a
record type with mutable fields. This way you could do the
initialization in a safe way (no magic) using side effects, and still
export a safe immutable type to the external world.
-- Pierre WeisINRIA, Projet Cristal, http://pauillac.inria.fr/~weis
This archive was generated by hypermail 2b29 : Thu Apr 06 2000 - 15:57:52 MET DST