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 B3CA2D45F for ; Wed, 2 Nov 2005 12:18:03 +0100 (CET) Received: from fuzzy.phpwebhosting.com (194.67-19-13.reverse.theplanet.com [67.19.13.194] (may be forged)) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id jA2BI2Fk030132 for ; Wed, 2 Nov 2005 12:18:03 +0100 Received: (qmail 25954 invoked from network); 2 Nov 2005 11:18:00 -0000 Received: from unknown (HELO [192.168.0.4]) (24.163.160.87) by 194.67-19-13.reverse.theplanet.com with (DHE-RSA-AES256-SHA encrypted) SMTP; Wed, 02 Nov 2005 06:18:00 -0500 Message-ID: <4368AA08.8030409@confluent.org> Date: Wed, 02 Nov 2005 05:59:04 -0600 From: Tom Hawkins User-Agent: Mozilla Thunderbird 1.0 (X11/20050115) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Nesting Modules References: <43679EEF.70102@confluent.org> <20051102094613.GA8506@furbychan.cocan.org> In-Reply-To: <20051102094613.GA8506@furbychan.cocan.org> X-Enigmail-Version: 0.89.5.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at nez-perce with ID 4368A06A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 nesting:01 compiler:01 mli:01 mli:01 wrote:01 wrote:01 inline:01 modules:01 modules:01 hierarchy:01 hierarchical:02 hierarchical:02 renaming:02 somewhere:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 Richard Jones wrote: > On Tue, Nov 01, 2005 at 10:59:27AM -0600, Tom Hawkins wrote: > >>Can I instruct the compiler to nest Bottom somewhere in Top, to obtain >>clean, hierarchical names (eg: Top.Bottom.some_function)? Of course I >>can inline bottom.ml in top.ml, but then the file become rather large. > > > If you want clean, hierarchical names it's much better to use '_' to > separate the hierarchies (eg. Top_Bottom). The reason for this is > that it allows others to extend your hierarchy by adding other modules > (eg. someone else can easily then create Top_MyExtension). > > This means a bit of file renaming: > > top.mli > top.ml > top_Bottom.mli > top_Button.ml But then you're forced to Drag_Along_Every_Module_To_Get_To_Something.useful. ;-) As a library user, I would much prefer: open Drag.Along.Every.Module.To.Get.To Something.useful () -Tom