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 TAA05723; Thu, 15 Jul 2004 19:20:07 +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 TAA05383 for ; Thu, 15 Jul 2004 19:20:06 +0200 (MET DST) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.195]) by nez-perce.inria.fr (8.12.10/8.12.10) with SMTP id i6FHK4EV026546 for ; Thu, 15 Jul 2004 19:20:05 +0200 Received: by mproxy.gmail.com with SMTP id d5so558883rng for ; Thu, 15 Jul 2004 10:20:01 -0700 (PDT) Received: by 10.38.207.66 with SMTP id e66mr61034rng; Thu, 15 Jul 2004 10:20:00 -0700 (PDT) Message-ID: Date: Thu, 15 Jul 2004 13:20:00 -0400 From: John Prevost To: Brian Hurt Subject: Re: [Caml-list] Unboxing options, was RE: assertions or exceptions? Cc: Ocaml Mailing List In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: X-Miltered: at nez-perce with ID 40F6BCC4.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; prevost:01 prevost:01 caml-list:01 unboxing:01 2004:99 cdt:99 boxing:01 unboxing:01 unboxed:01 assertions:01 identical:03 identical:03 wrote:03 exceptions:04 exceptions:04 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 15 Jul 2004 10:38:14 -0500 (CDT), Brian Hurt wrote: > One of the problems with returning error conditions instead of throwing > exceptions is the cost of boxing a 'a option. I'd like to advocate for > the idea of unboxing 'a options. This has been discussed before. The essential problem is this: Currently: type 'a option is not the same as type 'a option option Some Some 1 is not the same as Some 1 Some None is not the same as None With unboxed options: type 'a option is the same as type 'a option option Some Some 1 is identical to Some 1 Some None is identical to None John. ------------------- 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