From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id ADB96BC6C for ; Fri, 8 Feb 2008 12:56:37 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAFrSq0fUVZgL/2dsb2JhbACsMQ X-IronPort-AV: E=Sophos;i="4.25,321,1199660400"; d="scan'208";a="7095767" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 08 Feb 2008 12:56:37 +0100 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m18BubGh021570 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 8 Feb 2008 12:56:37 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAFrSq0fUVZgL/2dsb2JhbACsMQ X-IronPort-AV: E=Sophos;i="4.25,321,1199660400"; d="scan'208";a="7095766" Received: from hades.snarc.org ([212.85.152.11]) by mail2-smtp-roc.national.inria.fr with ESMTP; 08 Feb 2008 12:56:37 +0100 Received: by hades.snarc.org (Postfix, from userid 1000) id 4420B1B482; Fri, 8 Feb 2008 12:56:35 +0100 (CET) Date: Fri, 8 Feb 2008 12:56:35 +0100 To: rlehy@free.fr Cc: caml-list@inria.fr Subject: Re: [Caml-list] [OSR] Exceptionless error management, take 2 Message-ID: <20080208115635.GA2885@snarc.org> References: <1202396482.6084.5.camel@Blefuscu> <20080208.001729.233402575.garrigue@math.nagoya-u.ac.jp> <20080208095333.GA582@snarc.org> <1202467938.47ac3462d077a@imp.free.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1202467938.47ac3462d077a@imp.free.fr> X-Warning: Email may contain unsmilyfied humor and/or satire. User-Agent: Mutt/1.5.16 (2007-06-11) From: tab@snarc.org (Vincent Hanquez) X-Miltered: at concorde with ID 47AC4375.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; 0100,:01 clashing:01 variants:01 compiler:01 compiler:01 polymorphic:01 polymorphic:01 wrote:01 caml-list:01 variant:02 variant:02 match:02 module:03 module:03 library:03 On Fri, Feb 08, 2008 at 11:52:18AM +0100, rlehy@free.fr wrote: > Could you please expand on this "pollution" and the *practical* problems it > causes? I can see the risk of my own identifiers clashing with those of a > library, and that finding documentation when the namespace is flat is harder. > But none of these seem applicable for polymorphic variants, so I feel like I'm > missing something. For example, an `Error returned by module X could be use in a code expecting an `Error returned by module Y, even though that the `Error could means something totally different (semanticly). If I use normal variant, the compiler will prevent me using the same code to match a X.Error and a Y.Error. And don't get me wrong, i'm not saying polymorphic variant should never be use, it has its limited use (when people knows exactly what they are doing), but usually i prefer keeping this safety net , and like that the compiler tells me i can't use a Y.Error like a X.Error. -- Vincent Hanquez