caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Christophe Raffalli <Christophe.Raffalli@univ-savoie.fr>
Cc: caml-list@inria.fr
Subject: [Caml-list] Type safe affectation ?
Date: Fri, 13 Jun 2003 12:03:09 +0200	[thread overview]
Message-ID: <3EE9A15D.7080403@univ-savoie.fr> (raw)
In-Reply-To: <3EE98610.6090001@ozemail.com.au>

[-- Attachment #1: Type: text/plain, Size: 1220 bytes --]


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
---------------------------------------------

[-- Attachment #2: Type: application/pgp-signature, Size: 252 bytes --]

  reply	other threads:[~2003-06-13 10:03 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-13  6:44 [Caml-list] FP's and HyperThreading Processors David McClain
2003-06-13  8:06 ` John Max Skaller
2003-06-13 10:03   ` Christophe Raffalli [this message]
2003-06-14 13:35     ` [Caml-list] Type safe affectation ? Xavier Leroy
2003-06-15 18:53       ` brogoff
2003-06-15 19:49         ` Brian Hurt
2003-06-16  1:38           ` Jacques Garrigue
2003-06-13 18:38 ` [Caml-list] FP's and HyperThreading Processors Kip Macy
2003-06-13 21:23   ` David McClain
2003-06-13 21:39     ` Kip Macy
2003-06-13 21:56       ` David McClain
2003-06-14 22:08         ` John Max Skaller
2003-06-14  6:11     ` Ville-Pertti Keinonen
2003-06-13 19:07 ` Xavier Leroy
2003-06-13 21:33   ` Jim Farrand
2003-06-13 21:39     ` David McClain
2003-07-02 10:26   ` David Monniaux
2003-06-17  0:59 [Caml-list] Type safe affectation ? Gregory Morrisett
2003-06-17 11:10 ` Christophe Raffalli
2003-06-17 14:07 Gregory Morrisett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3EE9A15D.7080403@univ-savoie.fr \
    --to=christophe.raffalli@univ-savoie.fr \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).