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 PAA22527 for caml-redistribution@pauillac.inria.fr; Thu, 6 Apr 2000 15:56:14 +0200 (MET DST) Resent-Message-Id: <200004061356.PAA22527@pauillac.inria.fr> Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA04924 for ; Thu, 6 Apr 2000 15:34:20 +0200 (MET DST) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id PAA28921; Thu, 6 Apr 2000 15:34:19 +0200 (MET DST) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id PAA18159; Thu, 6 Apr 2000 15:34:18 +0200 (MET DST) From: Markus Mottl Message-Id: <200004061334.PAA18159@miss.wu-wien.ac.at> Subject: Re: cyclic value construction ("let rec") To: Pierre.Weis@inria.fr (Pierre Weis) Date: Thu, 6 Apr 2000 15:34:18 +0200 (MET DST) Cc: caml-list@inria.fr (OCAML) In-Reply-To: <20000406151819.42281@pauillac.inria.fr> from "Pierre Weis" at Apr 06, 2000 03:18:19 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Resent-From: weis@pauillac.inria.fr Resent-Date: Thu, 6 Apr 2000 15:56:14 +0200 Resent-To: caml-redistribution@pauillac.inria.fr > 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. Sounds like a good idea! Using powerful "magic" is probably too dangerous for "everyday"-use and definitely not in accordance with the "zero defect" ambitions of the type system... Although it would sometimes be nice to even hide specific fields of the record, this would probably not work well together with separate compilation. However, the memory layout of the fields does not change by just omitting the "mutable" declaration, so this should not do any harm. Best regards, Markus Mottl -- Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl