From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id D19EFD45F for ; Wed, 2 Nov 2005 12:08:27 +0100 (CET) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jA2B8QCk029139 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 2 Nov 2005 12:08:27 +0100 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1EXGmG-00034J-00; Wed, 02 Nov 2005 11:27:36 +0000 Date: Wed, 2 Nov 2005 11:27:36 +0000 To: Daniel =?iso-8859-1?Q?B=FCnzli?= Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Nesting Modules Message-ID: <20051102112736.GA9641@furbychan.cocan.org> References: <43679EEF.70102@confluent.org> <20051102094613.GA8506@furbychan.cocan.org> <1E27D2C8-E4BC-4AC2-86BF-BD906F4CDD25@epfl.ch> <20051102104759.GA5067@furbychan.cocan.org> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.3.28i From: Richard Jones X-Miltered: at nez-perce with ID 43689E2A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 nesting:01 functors:01 perl's:01 perl's:01 cpan:01 ocaml:01 cpan:01 notepad:01 ...:98 wrote:01 modules:01 modules:01 module:03 repository:04 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=SPF_FAIL autolearn=disabled version=3.0.3 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