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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 8CF20BC6C for ; Tue, 5 Feb 2008 12:14:15 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAE7Tp0fUVZgL/2dsb2JhbACtCg X-IronPort-AV: E=Sophos;i="4.25,307,1199660400"; d="scan'208";a="7616272" Received: from hades.snarc.org ([212.85.152.11]) by mail1-smtp-roc.national.inria.fr with ESMTP; 05 Feb 2008 12:14:14 +0100 Received: by hades.snarc.org (Postfix, from userid 1000) id 5B4AC1B482; Tue, 5 Feb 2008 12:14:12 +0100 (CET) Date: Tue, 5 Feb 2008 12:14:12 +0100 To: Jacques Garrigue Cc: daniel.buenzli@erratique.ch, caml-list@yquem.inria.fr Subject: Re: [Caml-list] [OSR] Suggested topic - XML processing API Message-ID: <20080205111412.GB4712@snarc.org> References: <47A7EDFE.1050805@frisch.fr> <36788A32-5BAC-4D57-9D0A-B9A20A49536F@erratique.ch> <20080205095137.GA3573@snarc.org> <20080205.191340.243285516.garrigue@math.nagoya-u.ac.jp> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080205.191340.243285516.garrigue@math.nagoya-u.ac.jp> 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-Spam: no; 0.00; polluted:01 functorize:01 variants:01 polluted:01 node:01 node:01 variants:01 constructors:01 polymorphic:01 polymorphic:01 wrote:01 caml-list:01 precisely:01 variant:02 variant:02 On Tue, Feb 05, 2008 at 07:13:40PM +0900, Jacques Garrigue wrote: > > that's really a bad idea; As a user of xmlm, I hope you're going to > > re-consider. the polymorphic variant namespace is so easily polluted by > > random "value" that library should never use them or at least doesn't > > advertise them as public interface. > > I have no particular opinion on this particular case (if you want to > allow chaning the library, you can also functorize your code, which > would work with normal variants too), but could you explain how > polymorphic variant namespace can get polluted? I consider them as pollution since they don't have a "namespace", but that might not be the right word here. What i want to express is the fact that when I use "`Node", i can't tell from where it's coming from; is that an Xml node, a binary tree node, a Red/Black tree node, etc ? dunno. when I have a "Xml.Node", i automaticly knows that Node is coming from the Xml namespace, and it's an xml node. > The point of polymorphic variants is precisely that pollution does > not exist (i.e. only constructors that appear in the same type > matter). This is what makes them so nice in libraries. I beg to differ. I'm happy to know from where my symbol comes from, since that's automatic code documentation for me. using polymorphic variant just put everything in the same flat namespace. -- Vincent Hanquez