From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id A3D62BC69 for ; Fri, 23 Feb 2007 21:41:46 +0100 (CET) Received: from chokecherry.srv.cs.cmu.edu (CHOKECHERRY.SRV.CS.CMU.EDU [128.2.185.41]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1NKfiwQ004152 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Fri, 23 Feb 2007 21:41:46 +0100 Received: from stratocaster.home (c-24-3-154-106.hsd1.pa.comcast.net [24.3.154.106]) (authenticated bits=0) by chokecherry.srv.cs.cmu.edu (8.13.6/8.13.6) with ESMTP id l1NKfhZV014889 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Fri, 23 Feb 2007 15:41:44 -0500 (EST) Received: from ecc by stratocaster.home with local (Exim 4.63) (envelope-from ) id 1HKhEf-0001Fg-Ge for caml-list@inria.fr; Fri, 23 Feb 2007 15:41:45 -0500 Date: Fri, 23 Feb 2007 15:41:45 -0500 To: caml-list@inria.fr Subject: Re: [Caml-list] Modules vs Modular programming Message-ID: <20070223204145.GA4632@localhost> Mail-Followup-To: caml-list@inria.fr References: <1172261771.5108.9.camel@oxylin.no-ip.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1172261771.5108.9.camel@oxylin.no-ip.org> User-Agent: Mutt/1.5.13 (2006-08-11) From: Eric Cooper X-Miltered: at concorde with ID 45DF5188.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; modular:01 0100,:01 ocaml:01 ocaml:01 trivial:01 model:01 mli:01 granularity:01 trivial:01 functor:01 23,:98 wrote:01 caml-list:01 modules:02 modules:02 On Fri, Feb 23, 2007 at 09:16:11PM +0100, Julien Peeters wrote: > I'am currently working on a academic project in OCaml. I have to do the > choice of multiple files vs multiple ocaml modules per file. > > I would like to know your point of view about this choice I have to do. > For instance, what did you choose if you've already done this choice and > why? I would use one module per file for all but trivial modules, to take advantage of the OCaml compiler's support for that model (pairing of .mli with .ml files), and better support by software development tools like make and subversion, etc., which operate at file granularity. An example of trivial modules where this doesn't apply would be those built for the purposes of functor application -- they often have components that just rename values defined elsewhere. -- Eric Cooper e c c @ c m u . e d u