Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Pierre Weis <Pierre.Weis@inria.fr>
To: mottl@miss.wu-wien.ac.at (Markus Mottl)
Cc: caml-list@inria.fr
Subject: Re: bottom types and threaded exits
Date: Thu, 5 Oct 2000 20:39:01 +0200 (MET DST)	[thread overview]
Message-ID: <200010051839.UAA10715@pauillac.inria.fr> (raw)
In-Reply-To: <20001002182809.A13821@miss.wu-wien.ac.at> from Markus Mottl at "Oct 2, 100 06:28:09 pm"

> On Mon, 02 Oct 2000, Patrick M Doane wrote:
> > This may be too obvious to point out, but that statement isn't always
> > true. From the Pervasives library:
> > 
> >   val input_value : in_channel -> 'a
> > 
> > clearly returns. I don't quite understood why the return type isn't
> > a monomorphic type variable though.
> 
> The "input_value"-function is unfortunately not type safe: you can "cast"
> whatever data you get from the channel to any kind of type - whether this
> is correct or not. There is currently no better way to do it if you want to
> reconstruct marshalled data (data that was sent with output_value). You
> have to trust that the OCaml-data you get is of the type you expect.
> 
> Pierre mentioned that there is work going on in this field (a PhD-thesis)
> that should make I/O much safer. Is there any news about this?
> 
> Best regards,
> Markus Mottl
> 
> -- 
> Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl

Nothing to add to Markus explanation, except that the type of (the
equivalent of) input_value in the new system is

 Forall $a. in_channel -> $a

the $ in $a meaning that this is not a regular structural polymorphic
type parameter, but a special ``dynamic'' type parameter (with special
typing rule and compilation).

Jun Furuse is working on the subject. His PhD-thesis is on the way
(more than 150 pages written). The type system and compiler are up and
running on top of a 2.99 Objective Caml system. The current plan is to
distribute this version as soon as the final draft of the thesis is
achieved, since the thesis definitively has the highest priority.

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://cristal.inria.fr/~weis/




  reply	other threads:[~2000-10-05 18:39 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-23 14:25 Julian Assange
2000-09-24 19:14 ` Pierre Weis
2000-09-25 10:08 ` Remi VANICAT
2000-09-25 18:38   ` John Prevost
2000-09-26  9:16 ` Xavier Leroy
2000-09-30  9:12   ` Julian Assange
2000-09-30 14:25     ` Pierre Weis
2000-09-30 15:19       ` Markus Mottl
2000-09-30 14:28     ` Stefan Monnier
2000-10-02 13:11       ` Patrick M Doane
2000-10-02 16:28         ` Markus Mottl
2000-10-05 18:39           ` Pierre Weis [this message]
2000-09-25 19:56 Damien Doligez

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=200010051839.UAA10715@pauillac.inria.fr \
    --to=pierre.weis@inria.fr \
    --cc=caml-list@inria.fr \
    --cc=mottl@miss.wu-wien.ac.at \
    /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