From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA01355; Thu, 5 Apr 2001 19:47:06 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA00972 for caml-list@pauillac.inria.fr; Thu, 5 Apr 2001 19:47:05 +0200 (MET DST) Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA32738 for ; Thu, 5 Apr 2001 19:07:36 +0200 (MET DST) Received: from localhost.localdomain (cartman6.zip.com.au [61.8.20.134]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f35H7Wv04076 for ; Thu, 5 Apr 2001 19:07:33 +0200 (MET DST) Received: from ozemail.com.au (IDENT:root@localhost [127.0.0.1]) by localhost.localdomain (8.9.3/8.8.7) with ESMTP id DAA17477; Fri, 6 Apr 2001 03:07:22 +1000 Message-ID: <3ACCA64A.B441C814@ozemail.com.au> Date: Fri, 06 Apr 2001 03:07:22 +1000 From: John Max Skaller X-Mailer: Mozilla 4.7 [en] (X11; I; Linux 2.2.12-20 i686) X-Accept-Language: en MIME-Version: 1.0 To: Brian Rogoff CC: caml-list@inria.fr Subject: Re: [Caml-list] recursive modules redux, & interface files References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Brian Rogoff wrote: > Did you consider the trick Daniel showed using function references which > get initialized in the right order during the calls? Yes, but it's also just too messy. Many of the workarounds are probably OK for a few uses, but they don't really scale. With a 'fat' module, we get the simplest, cleanest, code, even if the module is rather large: interfaces are only useful if they help reduce complexity. The most scalable solution I found was to use classes to 'clump' related functions together, allowing a set of functions to be passed as a single argument (a class object). This also allowed some state to be put in the object instead of using a functional closure. -- John (Max) Skaller, mailto:skaller@maxtal.com.au 10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850 checkout Vyper http://Vyper.sourceforge.net download Interscript http://Interscript.sourceforge.net ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr