From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA16966 for caml-redistribution@pauillac.inria.fr; Thu, 6 Apr 2000 15:55:42 +0200 (MET DST) Resent-Message-Id: <200004061355.PAA16966@pauillac.inria.fr> Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA04818 for ; Thu, 6 Apr 2000 15:18:21 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.8.7/8.8.7) with ESMTP id PAA18259; Thu, 6 Apr 2000 15:18:19 +0200 (MET DST) Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA10318; Thu, 6 Apr 2000 15:18:19 +0200 (MET DST) Message-ID: <20000406151819.42281@pauillac.inria.fr> Date: Thu, 6 Apr 2000 15:18:19 +0200 From: Pierre Weis To: Markus Mottl Cc: caml-list@inria.fr Subject: Re: cyclic value construction ("let rec") References: <200004031257.OAA29741@miss.wu-wien.ac.at> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.89.1 In-Reply-To: <200004031257.OAA29741@miss.wu-wien.ac.at>; from Markus Mottl on Mon, Apr 03, 2000 at 02:57:19PM +0200 Resent-From: weis@pauillac.inria.fr Resent-Date: Thu, 6 Apr 2000 15:55:42 +0200 Resent-To: caml-redistribution@pauillac.inria.fr > 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