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 KAA04616; Tue, 4 Nov 2003 10:41:17 +0100 (MET) 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 KAA04508 for ; Tue, 4 Nov 2003 10:41:15 +0100 (MET) Received: from indyio.rz.uni-saarland.de (indyio.rz.uni-saarland.de [134.96.7.3]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id hA49fF104171 for ; Tue, 4 Nov 2003 10:41:15 +0100 (MET) Received: from cs.uni-sb.de (cs.uni-sb.de [134.96.254.254]) by indyio.rz.uni-saarland.de (8.12.10/8.12.9) with ESMTP id hA49fCFX40054531; Tue, 4 Nov 2003 10:41:13 +0100 (CET) Received: from mail.cs.uni-sb.de (mail.cs.uni-sb.de [134.96.254.200]) by cs.uni-sb.de (8.12.10/2003091100) with ESMTP id hA49exgp021061; Tue, 4 Nov 2003 10:41:12 +0100 (CET) Received: from mail.st.cs.uni-sb.de (goscinny.cs.uni-sb.de [134.96.235.32]) by mail.cs.uni-sb.de (8.12.10/2003073000) with ESMTP id hA49d58L005010; Tue, 4 Nov 2003 10:39:05 +0100 (CET) X-Authentication-Warning: email: Host goscinny.cs.uni-sb.de [134.96.235.32] claimed to be mail.st.cs.uni-sb.de Received: from jacobs.cs.uni-sb.de (jacobs.cs.uni-sb.de [134.96.235.135]) by mail.st.cs.uni-sb.de (Postfix) with ESMTP id 5E8FB34B1AA; Tue, 4 Nov 2003 10:39:05 +0100 (CET) Received: by jacobs.cs.uni-sb.de (Postfix, from userid 7528) id 409F29797D; Tue, 4 Nov 2003 10:39:05 +0100 (CET) Date: Tue, 4 Nov 2003 10:39:05 +0100 From: Christian Lindig To: Dustin Sallings Cc: Caml Mailing List Subject: Re: [Caml-list] Map efficiency? Message-ID: <20031104093905.GF24152@st> Mail-Followup-To: Christian Lindig , Dustin Sallings , Caml Mailing List References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-No-Archive: yes X-URL: http://www.st.cs.uni-sb.de/~lindig/ User-Agent: Mutt/1.5.4i X-Loop: caml-list@inria.fr X-Spam: no; 0.00; lindig:01 lindig:01 uni-sb:01 caml-list:01 beginners:01 generic:01 map's:01 implemented:01 functor:01 terribly:01 nov:01 user-defined:02 user-defined:02 module:03 wrote:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Mon, Nov 03, 2003 at 11:59:24PM -0800, Dustin Sallings wrote: > Also, is there a particular reason Map is so, um, inaccessible to > beginners? Hashtbl's generic interface is much more inviting than > Map's functorial-only interface, especially to those not terribly > familiar with the module system. Map depends on keys to be ordered. This in turn requires to allow for a user-defined order: assume sets as keys that are implemented by unordered lists. Different lists can represent the same set. Hence, it must be possible to provide a user-defined order that would treat those lists as equal. The functor argument of Map contains the compare() which does just that. -- Christian ------------------- 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