Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
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:

  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.

Rich.

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