From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id WAA13133; Thu, 15 Jul 2004 22:49:54 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 WAA13726 for ; Thu, 15 Jul 2004 22:49:53 +0200 (MET DST) Received: from biscayne-one-station.mit.edu (BISCAYNE-ONE-STATION.MIT.EDU [18.7.7.80]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i6FKnqEV014182 for ; Thu, 15 Jul 2004 22:49:53 +0200 Received: from manawatu-mail-centre.mit.edu (MANAWATU-MAIL-CENTRE.MIT.EDU [18.7.7.71]) by biscayne-one-station.mit.edu (8.12.4/8.9.2) with ESMTP id i6FKnqCq010018 for ; Thu, 15 Jul 2004 16:49:52 -0400 (EDT) Received: from psi-phi.mit.edu (PSI-PHI.MIT.EDU [18.187.1.35]) (authenticated bits=56) (User authenticated as jfc@ATHENA.MIT.EDU) by manawatu-mail-centre.mit.edu (8.12.4/8.12.4) with ESMTP id i6FKnnoM009470 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 15 Jul 2004 16:49:51 -0400 (EDT) Received: (from jfc@localhost) by psi-phi.mit.edu (8.12.9) id i6FKnnSd004687; Thu, 15 Jul 2004 16:49:49 -0400 Message-Id: <200407152049.i6FKnnSd004687@psi-phi.mit.edu> To: caml-list@inria.fr Subject: Re: [Caml-list] Unboxing options, was RE: assertions or exceptions? In-Reply-To: Your message of "Thu, 15 Jul 2004 15:48:30 CDT." Date: Thu, 15 Jul 2004 16:49:49 -0400 From: John Carr X-Miltered: at nez-perce with ID 40F6EDF0.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 unboxing:01 jfc:01 ocaml:01 assertions:01 distinguish:01 obj:03 exceptions:04 carr:05 cares:06 pattern:06 type:07 relies:07 represented:07 represented:07 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk [None represented internally as 0] > What's the representation of Some(None) then? The Some() goes away, and > the containing value is unboxed- it turns out to be the same as just None. > There is no way to differentiate Some(Some(Some(Some(None)))) from None. There is also no way to distinguish 0 from None in the current system. OCaml relies on type information to determine the meaning of a value. Is there valid code (no Obj.magic) that cares that (Some None) and (None) are both represented by the same bit pattern? ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners