caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: tab@snarc.org (Vincent Hanquez)
To: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
Cc: daniel.buenzli@erratique.ch, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] [OSR] Suggested topic - XML processing API
Date: Tue, 5 Feb 2008 12:14:12 +0100	[thread overview]
Message-ID: <20080205111412.GB4712@snarc.org> (raw)
In-Reply-To: <20080205.191340.243285516.garrigue@math.nagoya-u.ac.jp>

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


  reply	other threads:[~2008-02-05 11:14 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-01-30  0:54 Jim Miller
2008-01-30  2:37 ` [Caml-list] " Bünzli Daniel
2008-01-30  3:26   ` Jim Miller
2008-01-30  7:35     ` Alain Frisch
2008-01-30 10:32       ` Bünzli Daniel
2008-01-30 10:35     ` Jon Harrop
2008-01-30 17:25       ` Jim Miller
2008-02-05  3:23         ` Jim Miller
2008-02-05  5:02           ` Alain Frisch
2008-02-05  8:36             ` Bünzli Daniel
2008-02-05  9:51               ` Vincent Hanquez
2008-02-05 10:13                 ` Jacques Garrigue
2008-02-05 11:14                   ` Vincent Hanquez [this message]
2008-02-05 10:31                 ` Bünzli Daniel
2008-02-05 10:43                   ` Nicolas Pouillard
2008-02-05 13:29                     ` Jon Harrop
2008-02-05 14:53                       ` micha
2008-02-05 14:53                         ` Jon Harrop
2008-02-05 14:57                       ` David Teller
2008-02-05 11:21                   ` Vincent Hanquez
2008-02-05  8:15           ` Vincent Hanquez
2008-02-05 11:16             ` Stefano Zacchiroli
2008-01-30 15:55   ` Vincent Hanquez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080205111412.GB4712@snarc.org \
    --to=tab@snarc.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=daniel.buenzli@erratique.ch \
    --cc=garrigue@math.nagoya-u.ac.jp \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).