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 QAA20805 for caml-redistribution; Thu, 16 Apr 1998 16:20:56 +0200 (MET DST) 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 OAA23827 for ; Wed, 15 Apr 1998 14:26:30 +0200 (MET DST) Received: from lama-d132.univ-savoie.fr (lama-d132.univ-savoie.fr [193.48.123.132]) by concorde.inria.fr (8.8.7/8.8.5) with ESMTP id OAA22742 for ; Wed, 15 Apr 1998 14:26:29 +0200 (MET DST) Received: from lama-d132.univ-savoie.fr (localhost [127.0.0.1]) by lama-d132.univ-savoie.fr (8.8.7/8.8.5) with ESMTP id OAA01300; Sat, 25 Apr 1998 14:26:44 +0200 Message-Id: <199804251226.OAA01300@lama-d132.univ-savoie.fr> X-Mailer: exmh version 2.0zeta 7/24/97 Reply-to: Christophe.Raffalli@univ-savoie.fr To: Donald Syme cc: caml-list@pauillac.inria.fr Subject: Re: Non-destructive record update?? In-reply-to: Your message of "Wed, 15 Apr 1998 00:27:20 BST." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Sat, 25 Apr 1998 14:26:43 +0300 From: Christophe Raffalli Sender: weis I completely agree with that. You can end up with a messy program when you want to update record in a = functional way. Moreover, if you add one field to a record type you have = to = modify your program for each updating even if they are unrelated with the= new = field ! The syntax could be * x.y <- 2 (may be confusing with mutable syntax ?) * let y = 2 in record x = Or anything else, but there really should be something ! With the second syntax it is easy to extend the parser, = and you could have a "and" to update more than one field, with only one c= opy of the original record: let y = 2 and z = 3 in record x This is not the case with the straight forward compilation of: (x.y <- 2).z <- 3 = -- = Christophe Raffalli Laboratoire de Mathématique / LAMA Université de Savoie UFR SFA, Campus Scientifique 73376, Le Bourget du Lac CEDEX, FRANCE. URL: http://www.logique.jussieu.fr/www.raffalli email: Christophe.Raffalli@univ-savoie.fr