From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 71C0FBB9C for ; Sat, 26 Nov 2005 02:17:37 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAQ1HaBi031230 for ; Sat, 26 Nov 2005 02:17:36 +0100 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 CAA22353 for ; Sat, 26 Nov 2005 02:17:36 +0100 (MET) Received: from cenn.mc.mpls.visi.com (cenn.mc.mpls.visi.com [208.42.156.9]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAQ1HZ2w031227 for ; Sat, 26 Nov 2005 02:17:35 +0100 Received: from [192.168.42.2] (bhurt.dsl.visi.com [208.42.141.66]) by cenn.mc.mpls.visi.com (Postfix) with ESMTP id 58CA28181; Fri, 25 Nov 2005 19:17:34 -0600 (CST) Date: Fri, 25 Nov 2005 19:22:58 -0600 (CST) From: Brian Hurt X-X-Sender: bhurt@localhost.localdomain To: Nicolas Cannasse Cc: "Michael D. Adams" , caml-list@inria.fr Subject: Re: [Caml-list] Efficency of varient types In-Reply-To: <4387ACC9.2040107@motion-twin.com> Message-ID: References: <4387ACC9.2040107@motion-twin.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Miltered: at nez-perce with ID 4387B7B0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 4387B7AF.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 cannasse:01 constructors:01 intimately:01 garbage:01 segfault:01 wrote:01 int:01 readable:02 readable:02 variant:02 variant:02 nicolas:02 parameter:02 types:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Sat, 26 Nov 2005, Nicolas Cannasse wrote: > If you have a tagged variant where all constructors have a parameter, you can > use Obj module to unbox the Int variant but the code is a lot less readable. As a general rule, unless you work at INRIA, you should never, ever use the Obj module. Not only will the code be signifigantly less readable, it'll also be signifigantly more error prone, especially obscure, hard to debug unless you are intimately familiar with the inners of the garbage collector, segfault you program at random times, boy doesn't this feel like C++ bugs. Brian