Version française
Home     About     Download     Resources     Contact us    
Browse thread
[OSR] Suggested topic - XML processing API
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jacques Garrigue <garrigue@m...>
Subject: Re: [Caml-list] [OSR] Suggested topic - XML processing API
From: tab@snarc.org (Vincent Hanquez)
> On Tue, Feb 05, 2008 at 09:36:02AM +0100, Bünzli Daniel wrote:
> >> - having a common spec for several libs makes more sense if they can share 
> >> common types; maybe you should use polymorphic variants instead of regular 
> >> ones?
> >
> > Agreed. In xmlm these variants become polymorphic in the next version.
> 
> 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?
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.

Jacques Garrigue