To: Donald Syme <Donald.Syme@cl.cam.ac.uk>
Subject: Re: Non-destructive record update??
Date: Sat, 25 Apr 1998 14:26:43 +0300
From: Christophe Raffalli <email@example.com>
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 =
modify your program for each updating even if they are unrelated with the=
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=
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
Laboratoire de Mathématique / LAMA
Université de Savoie
UFR SFA, Campus Scientifique
73376, Le Bourget du Lac CEDEX, FRANCE.
This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:14 MET