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 UAA28928; Tue, 10 Jul 2001 20:09:27 +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 UAA28920 for ; Tue, 10 Jul 2001 20:09:26 +0200 (MET DST) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f6AI93b17991; Tue, 10 Jul 2001 20:09:04 +0200 (MET DST) Received: from localhost (patrick@localhost) by fledge.watson.org (8.11.3/8.11.3) with SMTP id f6AI8NK06665; Tue, 10 Jul 2001 14:08:23 -0400 (EDT) (envelope-from patrick@watson.org) Date: Tue, 10 Jul 2001 14:08:22 -0400 (EDT) From: Patrick M Doane To: Brian Rogoff cc: John Max Skaller , Jun Furuse , caml-list@inria.fr Subject: Re: "Re: [Caml-list] A G'Caml question" + additional info In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, 2 Jul 2001, Brian Rogoff wrote: > I'm convinced that the include scheme, when properly integrated with > modules, will be sufficient. We need more experience with the current > scheme. I'm convinced now too, it took me a day or two to think things over to come to the same conclusion. Caml already has support for generic programming by using functors but they can get cumbersome when concepts are highly separated. For example, I usually see every algorithm written as a functor. This is very powerful, but requires many more lines of code for all the functor instantiation. In some sense, we also lose a nice aspect of core ML -- the ability to avoid specifying types. Initially I thought that G'caml (when integrated with the rest of the language) wouldn't be able to improve on this model for writing libraries. When all the code is under central control, the code can obviously be reordered such that all generic values come before all derived generics. I now see that a library which wants to provide generic algorithms will be much easier to write with G'caml. Rather than providing a functor for every algorithm which must be instantiated in for a large variety of types, the library would provide one functor per module which needs to be instantiated once with the generic values defined by the application. This all makes sense, and is easy to trace/follow manually. Patrick ------------------- 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