caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: "Daniel Bünzli" <daniel.buenzli@epfl.ch>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Nesting Modules
Date: Wed, 2 Nov 2005 11:27:36 +0000	[thread overview]
Message-ID: <20051102112736.GA9641@furbychan.cocan.org> (raw)
In-Reply-To: <C8363C6C-96D2-4F2E-B59C-FAD43872AACB@epfl.ch>

On Wed, Nov 02, 2005 at 11:57:45AM +0100, Daniel Bünzli wrote:
> Le 2 nov. 05 à 11:47, Richard Jones a écrit :
> > consider a database layer:
> >
> >  Database
> >  Database_Postgres
> >  Database_MySQL
> >
> >Obviously '_' is the way to go here if you want multiple third parties
> >to provide database modules.  'include' wouldn't work at all here.
> 
> You are right. I think 'include' doesn't work here because there is a  
> notion of choice. If I understand well your example, functors  
> wouldn't help here because it is not that you want to get a unified  
> interface (frontend) from a specific database implementation  
> (backend), but you really want to access database specific features  
> via the third party modules, right ?

Yes; I'm really comparing it to Perl's modules.  In Perl's module
repository, CPAN, they have a zillion modules and so need to name them
sensibly and hierarchically.  For example under "Net"[1] you have
"Net::DHCP", "Net::Daemon", "Net::FTP", etc...  There is no way to
"open Net" (or its equivalent) in Perl - this is just a useful way to
organise modules.

May not be applicable to OCaml of course.

Rich.

[1] http://www.cpan.org/modules/by-module/Net/

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com


  reply	other threads:[~2005-11-02 11:08 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-11-01 16:59 Tom Hawkins
2005-11-02  1:39 ` [Caml-list] " Pietro Abate
2005-11-02  6:43   ` Martin Jambon
2005-11-02  1:45 ` Robert Roessler
2005-11-02  2:03 ` Chris King
2005-11-02  8:42   ` Daniel Bünzli
2005-11-02 12:00     ` Tom Hawkins
2005-11-02 12:09       ` Daniel Bünzli
     [not found] ` <Pine.LNX.4.62.0511011028340.4466@ganymede.cs.unm.edu>
2005-11-02  4:47   ` Tom Hawkins
2005-11-02  9:46 ` Richard Jones
2005-11-02  9:57   ` Daniel Bünzli
2005-11-02 10:47     ` Richard Jones
2005-11-02 10:57       ` Daniel Bünzli
2005-11-02 11:27         ` Richard Jones [this message]
2005-11-02 11:59   ` Tom Hawkins
2005-11-02 12:33     ` Richard Jones
2005-11-02 13:11     ` Christophe TROESTLER
2005-11-02 14:02       ` Tom Hawkins
2005-11-02 14:36         ` Gerd Stolpmann
2005-11-02 13:34 ` Oliver Bandel

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=20051102112736.GA9641@furbychan.cocan.org \
    --to=rich@annexia.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=daniel.buenzli@epfl.ch \
    /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).