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 XAA13788 for caml-redistribution; Sun, 10 Oct 1999 23:34:37 +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 XAA11667 for ; Sun, 10 Oct 1999 23:05:30 +0200 (MET DST) Received: from postbox.dai.ed.ac.uk (postbox.dai.ed.ac.uk [129.215.41.196]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id XAA25730 for ; Sun, 10 Oct 1999 23:05:28 +0200 (MET DST) Received: from buckie (buckie.dai.ed.ac.uk [129.215.41.224]) by postbox.dai.ed.ac.uk (8.9.3/8.9.3) with SMTP id WAA15442; Sun, 10 Oct 1999 22:05:26 +0100 (BST) Date: Sun, 10 Oct 1999 22:05:26 +0100 Message-Id: <24984.199910102105@buckie> From: William Chesters MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: caml-list@inria.fr Subject: Re: Proposal for study: Add a categorical Initial type to ocaml In-Reply-To: <38002EBF.DF0EF779@maxtal.com.au> References: <37FC6572.719AD12D@tsc.uc3m.es> <37FE1E1F.4790FE85@maxtal.com.au> <38002EBF.DF0EF779@maxtal.com.au> X-Mailer: VM 6.22 under Emacs 19.34.1 Sender: weis skaller writes: > > > Boxed values can use a null pointer for none. > > > > I have a question--how is this different (except for the efficiency of > > using null) from using a 'a option array? > > It isn't, in theory, it is exactly the same (and therefore sound). I think (correct me if I'm wrong, sorry) that this is a return to an issue which seems to be a bit of an FAQ. The problem is that if you have a value of the type `int option option', you have to be able to distinguish between `None' and `Some None'! If both the enumeration-indirections are elided, you can't; if only one of them is, you have inconsistency which would presumably have to be resolved using whole-program optimisation or something. For the lowdown and an interesting proposal for a fix, see http://caml.inria.fr/caml-list/0967.html The same idea would obviously apply to arrays.