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 PAA02745; Fri, 7 Nov 2003 15:02:11 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA02786 for ; Fri, 7 Nov 2003 15:02:10 +0100 (MET) Received: from carrierpigeon.cs.umd.edu (carrierpigeon.cs.umd.edu [128.8.129.58]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hA7E29112370 for ; Fri, 7 Nov 2003 15:02:09 +0100 (MET) Received: from mwhlaptop.cs.umd.edu (mwhlaptop.cs.umd.edu [128.8.126.59]) (authenticated bits=0) by carrierpigeon.cs.umd.edu (8.12.10/8.12.5) with ESMTP id hA7E218e015355 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Fri, 7 Nov 2003 09:02:02 -0500 (EST) Subject: Re: Why are functors better? (Re: [Caml-list] Map efficiency?) From: Michael Hicks To: "Yaron M. Minsky" Cc: Caml List In-Reply-To: <1068205181.30150.12.camel@dragonfly.localdomain> References: <20031104093905.GF24152@st> <3FA7EC77.50502@baretta.com> <16299.22375.433305.104788@gargle.gargle.HOWL> <1068205181.30150.12.camel@dragonfly.localdomain> Content-Type: text/plain Message-Id: <1068213721.16399.2.camel@mwhlaptop.cs.umd.edu> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.2.2 (1.2.2-5) Date: 07 Nov 2003 09:02:01 -0500 Content-Transfer-Encoding: 7bit X-Loop: caml-list@inria.fr X-Spam: no; 0.00; functors:01 caml-list:01 slides:01 yaron:01 minsky:01 filliatre:01 functors:01 functorial:01 preferable:01 functorial:01 afa:99 yminsky:01 overkill:01 caml:01 groups:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Benjamin Pierce did a nice talk at ICFP a couple of years ago about sophisticated module systems, examining where (or if) they are really needed. The slides are at http://www.cis.upenn.edu/~bcpierce/papers/modules-icfp.ps This is not exactly on target for your point about ease-of-use, but it's related. Mike On Fri, 2003-11-07 at 06:39, Yaron M. Minsky wrote: > On Fri, 2003-11-07 at 03:27, Jean-Christophe Filliatre wrote: > > [ Some discussion of methods for building maps without functors ] > > > > (But the functorial interface is definitely the best, of course.) > > I don't understand this perspective at all. Functors seem like a fairly > problematic corner of the language. In this case, except for some > possible efficiency issues, it seems clear that a non-functorial map is > preferable, for simplicity and ease-of-use issues, and performance > aside, I can't see much to recommend the current functorial approach. > > Functors would be a lot more useful if they could be used as a > large-scale structural tool. Sadly, the current implementation makes > this quite difficult, since there's no good way of parameterizing > multiple modules at once (as noted in a previous thread. See > > http://groups.google.com/groups?q=group%3Afa.caml+functors+yminsky&ie=UTF-8&oe=UTF-8&hl=en&btnG=Google+Search > > for details.) For most situations where you'd really need them, they're > not powerful enough. And for the situations where they're powerful > enough, they're usually overkill. Map and Set are examples where they > almost strictly get in the way. > > y -- Michael Hicks ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners