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 IAA23811; Fri, 21 Sep 2001 08:45:04 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 IAA23807 for ; Fri, 21 Sep 2001 08:45:04 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f8L6Sun08562; Fri, 21 Sep 2001 08:28:56 +0200 (MET DST) Received: (from fpottier@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id IAA23584; Fri, 21 Sep 2001 08:28:55 +0200 (MET DST) Date: Fri, 21 Sep 2001 08:28:55 +0200 From: Francois Pottier To: Charles Martin Cc: caml-list@inria.fr Subject: Re: [Caml-list] polymorphic variant question Message-ID: <20010921082855.A23514@pauillac.inria.fr> Reply-To: Francois.Pottier@inria.fr References: <20010921001418.59933.qmail@web9208.mail.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Mailer: Mutt 1.0i In-Reply-To: <20010921001418.59933.qmail@web9208.mail.yahoo.com>; from joelisp@yahoo.com on Thu, Sep 20, 2001 at 05:14:18PM -0700 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > I have a number of modules A, B, C that share a single data structure > between them, all under the control of a central module. Each wants to > store different kinds of data in the data structure. Is it important that the modules share a common data structure? Given that the data items stored by each module are of a different type, it sounds like it would be reasonable to have one data structure per module. So, the central module (which provides the data structure) could be written as a functor and instantiated once per client module. -- François Pottier Francois.Pottier@inria.fr http://pauillac.inria.fr/~fpottier/ ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr