Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Nesting Modules
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-11-02 (10:28)
From: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Nesting Modules
On Wed, Nov 02, 2005 at 10:57:37AM +0100, Daniel Bünzli wrote:
> This doesn't scale well, suppose that I want to extend Top_Bottom,  
> then I have a module called Top_Bottom_Myextension. I think 'include'  
> is a better mechanism if you need to extend modules.

Well that's if you want to add more functions to Top_Bottom; obviously
'include' would be the way forwards there (or the equivalent notion
where you mirror the definitions from the base module which is how
ExtLib works).  However consider a database layer:


Obviously '_' is the way to go here if you want multiple third parties
to provide database modules.  'include' wouldn't work at all here.


Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology -
Team Notepad - intranets and extranets for business -