caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Nicolas Pouillard <nicolas.pouillard@gmail.com>
To: Maxence Guesdon <maxence.guesdon@inria.fr>
Cc: Paolo Donadeo <p.donadeo@gmail.com>,
	Caml_mailing list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] Wanted: your feedback on the hierarchy of OCaml Batteries Included
Date: Thu, 20 Nov 2008 10:28:07 +0100	[thread overview]
Message-ID: <1227172839-sup-5973@ausone.inria.fr> (raw)
In-Reply-To: <20081119211124.51610ae9@alcazar.inria.fr>

Excerpts from Maxence Guesdon's message of Wed Nov 19 21:11:24 +0100 2008:
> On Wed, 19 Nov 2008 10:46:24 +0100
> "Paolo Donadeo" <p.donadeo@gmail.com> wrote:
> 
> > Couldn't we take inspiration from the Python standard library [1]?
> > Python hasn't namespace but is provided with a module system similar
> > to OCaml *and* the standard library is really impressive.
> > 
> > And nobody can say Python is a bureaucratic language like Java :-)
> > 
> > 
> > [1] http://www.python.org/doc/2.5.2/lib/lib.html
> 
> Hello,
> 
> I think a hierarchy in the documentation is very useful: it helps beginners
> understand the big picture about all available modules and help developers
> find the functions they look for. But in the code, I think it is really
> more convenient to only have one level of "standard" modules.
> 
> By the way, I, too, always prefix idents with the module they come from,
> (like in List.length) and only "open" a module to use fields and
> constructors, so using Data.Containers.List.length or whatever is longer
> than "List.length" is not an option. Having a shortcut "List" for
> Data.Containers.List does not convince me, because the problem will remain
> with modules with no shortcut.
> 
> So hierarchy in documentation: yes; in the code: no.

No one (I guess) would recommend you to use fully qualified paths as in
Data.Containers.List.length of course. Data.Containers.List.length is the
external name, made to be well organized not to be quick to type, the way
to use it to open it *OR* to define an internal name for it :

module L = Data.Containers.List

And then use L.length, L.map...

I know that the choice of name qualification, opening, or local modules is
controversial, however I would like to point out that the external name don't
need to be the same than the internal name.

Cheers,

-- 
Nicolas Pouillard aka Ertai


  reply	other threads:[~2008-11-20  9:29 UTC|newest]

Thread overview: 80+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-18  9:56 David Teller
2008-11-18 10:06 ` [Caml-list] " Richard Jones
2008-11-18 10:21   ` Zheng Li
2008-11-18 11:22     ` David Teller
2008-11-18 12:52       ` Zheng Li
2008-11-18 14:10       ` [Caml-list] " Alain Frisch
2008-11-18 14:19         ` David Teller
2008-11-19  3:06         ` Yaron Minsky
2008-11-19  3:47           ` Till Varoquaux
2008-11-19 10:57           ` Stefano Zacchiroli
2008-11-19 18:05             ` Stéphane Glondu
2008-11-20  0:14               ` Stefano Zacchiroli
2008-11-18 10:29   ` [Caml-list] " Erkki Seppala
2008-11-18 11:34     ` Daniel Bünzli
2008-11-18 11:47       ` Thomas Gazagnaire
2008-11-18 12:15       ` David Teller
2008-11-18 12:32         ` Richard Jones
2008-11-18 12:56           ` David Teller
2008-11-19 13:38           ` Stefano Zacchiroli
2008-11-19 17:37             ` Richard Jones
2008-11-23 10:32               ` Stefano Zacchiroli
     [not found]         ` <9b415f950811180428x2de94a64q6fa92887f8e00705@mail.gmail.com>
2008-11-18 12:51           ` David Teller
2008-12-19 11:00             ` Benedikt Grundmann
2009-01-05 10:40               ` David Teller
2008-11-18 13:24         ` Daniel Bünzli
2008-11-18 14:46           ` David Teller
2008-11-18 12:40       ` David Teller
2008-11-18 13:31         ` Dario Teixeira
2008-11-18 14:23           ` David Teller
2008-11-18 14:40             ` Stefano Zacchiroli
2008-11-19 13:36       ` Stefano Zacchiroli
2008-11-19 14:28         ` Daniel Bünzli
2008-11-19 14:45           ` Paolo Donadeo
2008-11-21 12:37     ` Michaël Le Barbier
2008-11-18 11:17   ` David Teller
2008-11-18 12:22     ` Richard Jones
2008-11-18 12:49       ` David Teller
2008-11-18 15:20         ` Richard Jones
2008-11-18 18:17   ` Jon Harrop
2008-11-18 17:51     ` Nicolas Pouillard
2008-11-18 22:43       ` Jon Harrop
2008-11-18 18:59     ` Richard Jones
2008-11-18 20:17       ` Jon Harrop
2008-11-18 19:22         ` Richard Jones
2008-11-18 19:50           ` Daniel Bünzli
2008-11-18 21:50             ` Richard Jones
2008-11-19 13:48               ` Stefano Zacchiroli
2008-11-19 19:02                 ` Stéphane Glondu
2008-11-18 22:07     ` Alain Frisch
2008-11-18 23:49       ` Jon Harrop
2008-11-18 23:13         ` Alain Frisch
2008-11-19 13:28   ` Stefano Zacchiroli
2008-11-18 23:30 ` Jon Harrop
2008-11-19  6:29   ` David Teller
2008-11-19  8:36     ` Jon Harrop
2008-11-19  9:46     ` Paolo Donadeo
2008-11-19 20:11       ` Maxence Guesdon
2008-11-20  9:28         ` Nicolas Pouillard [this message]
2008-11-20 10:33           ` Richard Jones
2008-11-20 10:49             ` open Module (not?) considered harmful Stefano Zacchiroli
2008-11-20 11:29               ` [Caml-list] " David Allsopp
2008-11-20 11:48                 ` Richard Jones
2008-11-20 17:56                   ` Stefano Zacchiroli
2008-11-20 13:01                 ` Nicolas Pouillard
2008-11-20 13:41                   ` Nicolas Pouillard
2008-11-20 16:44                     ` Stefano Zacchiroli
2008-11-21  2:56                       ` Stability of exceptions Eliot Handelman
2008-11-21  7:39                         ` [Caml-list] " Daniel Bünzli
2008-11-21  9:52                         ` Christophe TROESTLER
2008-11-20 14:46                 ` [Caml-list] open Module (not?) considered harmful Ashish Agarwal
2008-11-20 17:54                 ` Stefano Zacchiroli
2008-11-20 11:31               ` Daniel Bünzli
2008-11-23 10:36                 ` Stefano Zacchiroli
2008-11-20 11:41               ` Richard Jones
2008-11-23 10:38                 ` Stefano Zacchiroli
2008-11-23 11:01                   ` Richard Jones
2008-11-20 12:58             ` [Caml-list] Wanted: your feedback on the hierarchy of OCaml Batteries Included Nicolas Pouillard
2008-11-20 21:12 ` David Teller
2008-11-20 23:18   ` Daniel Bünzli
2008-11-21  9:34     ` David Teller

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=1227172839-sup-5973@ausone.inria.fr \
    --to=nicolas.pouillard@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=maxence.guesdon@inria.fr \
    --cc=p.donadeo@gmail.com \
    /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).