From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA10361 for caml-red; Mon, 2 Oct 2000 21:29:12 +0200 (MET DST) 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 SAA18894 for ; Mon, 2 Oct 2000 18:28:33 +0200 (MET DST) Received: from miss.wu-wien.ac.at (miss.wu-wien.ac.at [137.208.107.17]) by nez-perce.inria.fr (8.10.0/8.10.0) with ESMTP id e92GSWn18670 for ; Mon, 2 Oct 2000 18:28:32 +0200 (MET DST) Received: (from mottl@localhost) by miss.wu-wien.ac.at (8.9.0/8.9.0) id SAA16855; Mon, 2 Oct 2000 18:28:09 +0200 (MET DST) Date: Mon, 2 Oct 2000 18:28:09 +0200 From: Markus Mottl To: Patrick M Doane Cc: Stefan Monnier , caml-list@inria.fr Subject: Re: bottom types and threaded exits Message-ID: <20001002182809.A13821@miss.wu-wien.ac.at> References: <39d5f89a$1@tequila.cs.yale.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from patrick@watson.org on Mon, Oct 02, 2000 at 09:11:01 -0400 Sender: weis@pauillac.inria.fr 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