Browse thread
[OSR] Suggested topic - XML processing API
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | tab@s... |
| Subject: | Re: [Caml-list] [OSR] Suggested topic - XML processing API |
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