[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Pierre Weis <Pierre.Weis@i...> |
| Subject: | Re: cyclic value construction ("let rec") |
> 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 Weis INRIA, Projet Cristal, http://pauillac.inria.fr/~weis