caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Gerd Stolpmann <info@gerd-stolpmann.de>
To: BdB <benoit.de-boursetty+caml-list@m4x.org>
Cc: Fernando Alegre <fernando@cc.gatech.edu>,
	Shawn Wagner <shawnw@speakeasy.org>,
	caml-list@inria.fr
Subject: RE: [Caml-list] GODI (was: CTAN/CPAN for Caml (COCAN ...?))
Date: 20 Jul 2003 11:55:49 +0200	[thread overview]
Message-ID: <1058694948.6556.141.camel@ice.gerd-stolpmann.de> (raw)
In-Reply-To: <KMEFLMEIPOIDHNANKEIJEECDCAAA.benoit.de-boursetty+caml-list@m4x.org>

Am Sam, 2003-07-19 um 22.40 schrieb BdB:
> Packaging and easing the distribution of libraries, is one issue ; naming
> hierarchy, i.e. ensuring non-collision of names used by different libraries,
> is another one. Both issues are very on-topic and need to be addressed. The
> only topic here is how to enable code reuse among the O'CaML community.

Both are related, at least in the sense that problems with code reuse
are often detected by packagers, or by users of packages. Furthermore,
packagers are the natural "authority" to ask the upstream developers to
change their software for better reuse.

> GS> Why don't you ask the developers to rename their modules?
> 
> I do not think it is very wise to "ask" too much -- especially such boring
> stuff as renaming -- in case of voluntary donations. Gerd, you are the
> author of findlib, which has been found out to collide with dynlink's Meta
> module, what did you think about having to rename all your modules to fl_*?

Given that I restructure my libraries from time to time from the grounds
up, this is really one of the things I try to take easy. Other types of
changes cause much more problems, especially inconveniences by the users
who have to follow the changes.

> Because you are an exceptionally generous contributor to the O'CaML
> community, you were willing to do this. But this raises the developer "entry
> barrier" significantly.

Yes, sure. But other "processes" do this, too, especially the namespace
approach you suggest.

> All the requirements I can come up with for now are listed below; I am
> curious to see what the list thinks about this. The numbers are just to keep
> track, not a rank.
> 
>  1. The top-level namespace should always be free to end-application
> developers
>  2. There should be syntactic sugar like "open" to access elements of the
> namespace in a context-sensitive manner -- some core namespaces should also
> be "open"-ed by default.
>  3. There should always be the option to use "fully qualified names" whose
> interpretation is immune to context variations. At any point in the code,
> all the namespace should be "locally accessible"; i.e. accessible by simply
> typing stuff where the cursor is, not needing to modify anything elsewhere.
>  4. It should be relatively painless for an application writer to spin off
> some top-level files of an application as a community library. This means it
> should be easy to move modules around in the namespace, or at least to push
> top-level modules down to other areas in the namespace.
>  5. The migration path for end-application developers should equally be easy
> (from the currently-flat namespace)
>  6. The SomeDataFormat example above must be able to be to be distributed in
> three parts situated at a hierarchical level below SomeDataFormat.
>  7. There should be room for
>     - Modules managed by the core language team (like the java.* namespace
> in Java)
>     - Managed community modules : CPAN-like archives
>     - Un-managed community modules : independent releases of libraries

That sounds really complicated! I am more and more thinking that we are
on the wrong track. Every hierarchical solution has the disadvantage
that it needs administration. I have an alternative, the "relational
solution". What we want to manage is nothing but a database of top-level
modules, and we want to find a way to uniquely identify every row of the
"modules table". Currently, the rows have only two fields: "name", and
"contents". My suggestion is to introduce further fields, like "author",
"organization", maybe even "version" and so on. So a module can have a
set of attributes:

module M = sig
  attributes
    author = "Gerd Stolpmann",
    organization = "ocaml-programming.de",
    version = "42.5"

  ... further signature ...
end

You can now disambiguate module names by these attributes, e.g.

open M[author="Gerd Stolpmann"]
open M[version>="42.0"]

To minimize the notation, I would suggest a default selection for the
whole module context:

select author="Gerd Stolpmann" for M
select organization="INRIA" | organization="..." | ... for *

The latter would be applied to all unqualified occurrences of top-level
module names, so you have typically only one extra line at the top of
every module implementation.

I would suppose this is very simple to implement in the compilers. There
is already meta data for top-level modules (the MD5 checksum), so it is
only an extension of this.

The best thing is that it is very natural for developers of libraries to
add the attributes to their exported modules. Collisions can be fixed
incrementally as they occur (even packagers could fix them easily
themselves). Maybe there could be a "style guide" explaining the
problems and how to address them by proper attributing the modules.

What do you think about this?

Gerd
-- 
------------------------------------------------------------
Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany 
gerd@gerd-stolpmann.de          http://www.gerd-stolpmann.de
------------------------------------------------------------

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2003-07-20  9:56 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-15 18:09 [Caml-list] CTAN/CPAN for Caml (COCAN ...?) Richard Jones
2003-07-15 18:37 ` Erik Arneson
2003-07-18  8:08   ` John Max Skaller
2003-07-16  3:13 ` BdB
2003-07-16  3:22   ` Alexander V. Voinov
2003-07-16  5:53     ` Issac Trotts
2003-07-16  6:43       ` BdB
2003-07-16  7:07         ` Wolfgang Müller
2003-07-16  9:22         ` Richard Jones
2003-07-16  9:51           ` Wolfgang Müller
2003-07-17  8:42         ` Florian Hars
2003-07-16  6:52   ` Florian Hars
2003-07-18  8:14 ` John Max Skaller
2003-07-18  8:42   ` Richard Jones
2003-07-18 15:46     ` Stefano Zacchiroli
2003-07-18 20:49       ` Yamagata Yoriyuki
2003-07-19 11:25         ` Daniel Bünzli
2003-07-19 19:47           ` Yamagata Yoriyuki
2003-07-18 14:29   ` Shawn Wagner
2003-07-19 11:55     ` [Caml-list] GODI (was: CTAN/CPAN for Caml (COCAN ...?)) Gerd Stolpmann
2003-07-19 12:18       ` Fernando Alegre
2003-07-19 12:38         ` Gerd Stolpmann
2003-07-19 13:20           ` Fernando Alegre
2003-07-19 22:58             ` Kip Macy
2003-07-19 20:05           ` [Caml-list] GODI Yamagata Yoriyuki
2003-07-19 20:40           ` [Caml-list] GODI (was: CTAN/CPAN for Caml (COCAN ...?)) BdB
2003-07-20  9:55             ` Gerd Stolpmann [this message]
2003-07-20 18:30               ` Christian Lindig
2003-07-21 16:19                 ` james woodyatt
2003-07-21 16:32                   ` Richard Jones
2003-07-21 16:37                     ` Richard Jones
2003-07-21 20:37                     ` james woodyatt
2003-07-21 21:48                     ` BdB
2003-07-22 20:48                   ` Christian Lindig
2003-07-22  0:01                 ` BdB
2003-07-22  2:35                   ` [Caml-list] licensing (was Re: GODI (was: CTAN/CPAN for Caml (COCAN ...?))) Alan Post
2003-07-22  7:57                     ` Dominique Quatravaux
2003-07-22  8:02                     ` BdB
2003-07-22 15:29                   ` [Caml-list] GODI Yamagata Yoriyuki
2003-07-20 23:11               ` Yamagata Yoriyuki
2003-07-21 12:01                 ` Fernando Alegre
2003-07-23  9:35       ` [Caml-list] GODI (was: CTAN/CPAN for Caml (COCAN ...?)) Xavier Leroy
2003-07-23 13:20         ` Gerd Stolpmann
2003-07-24 16:34           ` Eray Ozkural
2003-07-23 17:56         ` David Brown
2003-07-23 18:36           ` Fernando Alegre

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=1058694948.6556.141.camel@ice.gerd-stolpmann.de \
    --to=info@gerd-stolpmann.de \
    --cc=benoit.de-boursetty+caml-list@m4x.org \
    --cc=caml-list@inria.fr \
    --cc=fernando@cc.gatech.edu \
    --cc=shawnw@speakeasy.org \
    /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).