caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Daniel Bünzli" <daniel.buenzli@epfl.ch>
To: caml-list List <caml-list@inria.fr>
Subject: Cherry-picking modules (was Re: [Caml-list] [ANN] OCaml Reins 0.1 - Persistent Data	Structure Library)
Date: Wed, 26 Sep 2007 00:16:08 +0200	[thread overview]
Message-ID: <55A4E82E-3D05-4F79-A8A6-A87905EB4FC8@epfl.ch> (raw)
In-Reply-To: <46F961E5.5060302@cs.umd.edu>


Le 25 sept. 07 à 21:30, Mike Furr a écrit :

> I've deliberately tried to unify many of the conventions that  
> people have used to allow users to easily change between data  
> structure implementations.  A major goal of the project is that you  
> don't have to rely on downloading some random .ml/.mli from  
> someone's webpage and embed it your project.  Instead you just use  
> the reins library and only have to worry about updating one piece  
> of software for updates/ bug fixes.

While I really like having a central repository and unification of  
conventions I do like cherry-picking and embedding my modules.  
Nevertheless I understand and respect your point, maybe it is a  
matter of opinion/taste. But I'll explain why I like picking.

There are libraries that need several tightly dependent modules to  
provide their service and they should be distributed as libraries  
since use of one module implies use of the others -- note however  
that sometimes this is by misdesign e.g. everything can actually be  
easily and conveniently packed in a single module or some parts can  
be functorized away to split the distribution.

But there are also focused services that can be provided as single,  
pure caml, modules and these should IMHO be distributed as single  
modules. I try -- as much as possible -- to embed and statically link  
dependencies in my projects. Of course if there is a bug in one  
dependency it means more work for me. But the thing is that by doing  
so I put the burden and complexity of building my project on me and  
not on my users. If I do not do so, this burden may be aleviated (or  
not ?) by using a package management system but this solution messes  
the environment of my users.

There are a lot of useful reusable modules in many projects like  
extlib, ocamlnae, etc, however they are all tied to their  
"cathedral" [1] even though these ties are sometimes very small and  
could be functorized away (or dropped altogheter). Now if I _just_  
want to use the Unzip module of extlib, the Cf_tai64 module of  
ocamlnae and your Patricia set.  Why do I have to install these three  
whole libraries whereas I could simply integrate these three modules  
in my project ?

Having to install them not only puts a burden on potential users, but  
it also puts a burden on me when I suddenly start to hack my project  
in another environment which has not all the dependencies installed.  
In the end I think module integration makes me loose less time  
because once the build system is setup I have to think about it much  
less at later times. The alternative solution of embedding the whole  
libraries is the start of bloat. It also hides the real dependencies  
which makes it harder for new commers to approach the code base.

I think developers of reusable components should try to strive for  
*focused*, independent modules, even if it means functorization and  
convention. Eventually it makes it easier for developers to integrate  
these modules and exchange specific parts if some module poses a  
problem or better alternatives popup.

And while certainly more could be done to try to simplify this style  
of development (maybe something along the lines of caml-get), I have  
to say that now that we have been provided with ocamlbuild, the task  
of integrating pure caml modules is really a breeze -- even if you  
want to relegate dependencies to a specific directory.

Again I'm not for embedding everything in projects, sometimes it is  
unrealistic. But for exemple I'd systematically do this for data  
structures, unless of course they are in the standard distribution.

Best and thanks again for the work,

Daniel

[1] btw this was my point about the cathedral, many modules that you  
have to take as a one-stop-shop-it-all even if you care only for one,  
not the development style. 

  reply	other threads:[~2007-09-25 22:16 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-25 18:53 [ANN] OCaml Reins 0.1 - Persistent Data Structure Library Mike Furr
2007-09-25 19:14 ` [Caml-list] " Daniel Bünzli
2007-09-25 19:30   ` Mike Furr
2007-09-25 22:16     ` Daniel Bünzli [this message]
2007-09-25 23:33       ` Cherry-picking modules (was Re: [ANN] OCaml Reins 0.1 - Persistent Data Structure Library) Sylvain Le Gall
2007-09-26  6:41         ` [Caml-list] " skaller
2007-09-26  7:22         ` Daniel Bünzli
2007-09-26  8:19           ` skaller
2007-09-26  8:30             ` Daniel Bünzli
2007-09-26  8:58               ` skaller
2007-09-26  9:49                 ` Daniel Bünzli
2007-09-26 10:26           ` Sylvain Le Gall
2007-09-26 11:45             ` [Caml-list] " Jim Miller
2007-09-26 12:37               ` Sylvain Le Gall
2007-09-27 10:11               ` [Caml-list] " Richard Jones
2007-09-26 12:22             ` Daniel Bünzli
2007-09-26 12:58             ` skaller
2007-09-26 16:47             ` Sylvain Le Gall
2007-09-26 22:38             ` [Caml-list] " Vincent Aravantinos
2007-09-26 22:41               ` Vincent Aravantinos
2007-09-26  6:19       ` Cherry-picking modules (was Re: [Caml-list] " skaller
2007-09-26 15:08         ` Michael Furr
2007-09-26 17:12           ` skaller
2007-09-26 17:53             ` Mike Furr
2007-09-26 19:16               ` skaller
2007-10-05 14:42               ` Adrien
2007-10-05 14:58                 ` Cherry-picking modules (was Re: [Caml-list] [ANN] OCaml Reins 0.1- " Christoph Bauer
2007-10-05 15:21                   ` Adrien
2007-10-05 19:45                     ` Cherry-picking modules (was Re: [Caml-list] [ANN] OCaml Reins0.1- " David Allsopp
2007-10-05  3:48         ` Cherry-picking modules (was Re: [Caml-list] [ANN] OCaml Reins 0.1 - " Nathaniel Gray
2007-09-26  7:03       ` Maxence Guesdon
2007-09-26  7:44         ` skaller
2007-09-26  8:53           ` Maxence Guesdon
2007-09-26 10:05             ` Daniel Bünzli
2007-09-26  8:17         ` Daniel Bünzli
2007-09-26 15:32       ` Michael Furr
2007-09-26 15:50         ` Vincent Aravantinos
2007-09-26 16:42           ` Cherry-picking modules (was " Sylvain Le Gall
2007-09-26 17:38             ` [Caml-list] " skaller
2007-09-26 17:57             ` Vincent Aravantinos
2007-09-26 17:22         ` Cherry-picking modules (was Re: [Caml-list] " skaller
2007-09-26 18:17         ` Daniel Bünzli
2007-09-26 18:45           ` Mike Furr
2007-09-26 19:21           ` skaller
2007-09-26  5:51 ` ExtLib, etc. " David Teller
2007-09-26 20:37 ` [Caml-list] [ANN] OCaml Reins 0.1 - Persistent Data Structure Library Mike Furr

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=55A4E82E-3D05-4F79-A8A6-A87905EB4FC8@epfl.ch \
    --to=daniel.buenzli@epfl.ch \
    --cc=caml-list@inria.fr \
    /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).