From: Pierre Weis <weis@pauillac.inria.fr>
To: mael@id.dth.dk (Martin Elsman)
Cc: xleroy@pauillac.inria.fr (Xavier Leroy),
weis@pauillac.inria.fr (Pierre Weis)
Subject: Re: The unsound type checker of Caml Light.
Date: Sat, 19 Mar 1994 21:31:00 +0100 (MET) [thread overview]
Message-ID: <9403192031.AA05235@pauillac.inria.fr> (raw)
In-Reply-To: <199403191657.RAA08113@idfs3.id.dth.dk> from "Martin Elsman" at Mar 19, 94 05:57:34 pm
It is well known that the Caml Light typechecker is unsound for
mutable objects. It is clearly mentioned in the man page:
BUGS
...
Polymorphic references, and more generally mutable concrete
types, are not safe: it is possible to create polymorphic refer-
ences through a functional encoding.
That's clear: functional_ref is a functional encoding that create
polymorphic references.
As far as I know there is no working versions of Caml featuring the
kind of type systems described in Xavier's thesis. They are sound and
powerful, but may be too complex for common usage.
Nevertheless we definitively have to fix these bugs of the
typechecker. We probably have to switch to the simple scheme proposed
by the FX communauty in 1987 and shown to be pratical by Wright in
1993: restrict type generalisation to pure expressions (or
non-expansive expressions), or to values in Wright's terminology. This
is clearly correct, though it has somme drawbacks, since it forbids
some styles of programming, which intensively relies on polymorphism
obtained by partial applications of polymorphic functionals.
Hope this helps,
Pierre Weis
----------------------------------------------------------------------------
Cristal Project
INRIA, BP 105, F-78153 Le Chesnay Cedex (France)
E-mail: Pierre.Weis@inria.fr
Telephone: +33 1 39 63 55 98
----------------------------------------------------------------------------
prev parent reply other threads:[~1994-03-21 16:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-03-19 16:57 Martin Elsman
1994-03-19 20:31 ` Pierre Weis [this message]
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=9403192031.AA05235@pauillac.inria.fr \
--to=weis@pauillac.inria.fr \
--cc=mael@id.dth.dk \
--cc=xleroy@pauillac.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