Re: cyclic value construction ("let rec")

From: Pierre Weis (Pierre.Weis@inria.fr)
Date: Thu Apr 06 2000 - 15:18:19 MET DST

  • Next message: Markus Mottl: "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



    This archive was generated by hypermail 2b29 : Thu Apr 06 2000 - 15:57:52 MET DST