From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id MAA18383; Fri, 13 Jun 2003 12:03:01 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 MAA18679 for ; Fri, 13 Jun 2003 12:03:00 +0200 (MET DST) Received: from post.bourget.univ-savoie.fr (post.bourget.univ-savoie.fr [193.48.120.73]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h5DA2xT18258 for ; Fri, 13 Jun 2003 12:02:59 +0200 (MET DST) Received: from univ-savoie.fr (d85.lama.univ-savoie.fr [193.48.123.85]) by post.bourget.univ-savoie.fr (8.12.3/jtpda-5.4) with ESMTP id h5DA2tVO017474 for ; Fri, 13 Jun 2003 12:02:55 +0200 Message-ID: <3EE9A15D.7080403@univ-savoie.fr> Date: Fri, 13 Jun 2003 12:03:09 +0200 From: Christophe Raffalli User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.1) Gecko/20020826 X-Accept-Language: en-us, en MIME-Version: 1.0 CC: caml-list@inria.fr Subject: [Caml-list] Type safe affectation ? References: <003601c33177$324ecc40$0201a8c0@dylan> <3EE98610.6090001@ozemail.com.au> X-Enigmail-Version: 0.65.2.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig1241B7A4845BA7CE7990538B" X-Spam: no; 0.00; raffalli:01 univ-savoie:01 openpgp:01 2440:01 3156:01 funtion:01 immutable:01 infer:01 inference:01 savoie:01 chablais:01 73376:01 lama:01 enigmail:01 mutt:01 X-Attachments: type="application/pgp-signature" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig1241B7A4845BA7CE7990538B Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit Using the Obj module you can do affectation of cons cell of a list (or any onther data type), which is usefull for instance to write a tail recursive Map funtion ... (see a previous thread) But this is not typesafe ! Why not allow a typesafe way to mute immutable data (sum, products, immutable records and so on) ? --- By the way, another step would be to infer for each function if it mutes its arguments instead of annoting record with "mutable" indication. This is better because the same data may be considered as mutable by some functions (for instance when you construct the data) but then be used only by immutable functions and this way the type inference can help you insure that you do not mute the data anymore. But this is research topic ? -- Christophe Raffalli Université de Savoie Batiment Le Chablais, bureau 21 73376 Le Bourget-du-Lac Cedex tél: (33) 4 79 75 81 03 fax: (33) 4 79 75 87 42 mail: Christophe.Raffalli@univ-savoie.fr www: http://www.lama.univ-savoie.fr/~RAFFALLI --------------------------------------------- IMPORTANT: this mail is signed using PGP/MIME At least Enigmail/Mozilla, mutt or evolution can check this signature --------------------------------------------- --------------enig1241B7A4845BA7CE7990538B Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.7 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQE+6aFdSQDyWB/+xBwRAsB2AKCjCKJeqwSpZPuQz+SiTurTFDY6AACff8b8 cIVl5WhLE1cl4fMZicMTuHM= =OGtW -----END PGP SIGNATURE----- --------------enig1241B7A4845BA7CE7990538B-- ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners