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 RAA16124; Sun, 12 May 2002 17:19:32 +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 RAA16166 for caml-list@pauillac.inria.fr; Sun, 12 May 2002 17:19:32 +0200 (MET DST) 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 TAA04106 for ; Sat, 11 May 2002 19:36:42 +0200 (MET DST) Received: from sarg.ryerson.ca (sarg.ryerson.ca [141.117.18.117]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g4BHafH16951 for ; Sat, 11 May 2002 19:36:41 +0200 (MET DST) Received: from sarg.ryerson.ca (dmason@localhost) by sarg.ryerson.ca (8.11.2/8.11.2) with ESMTP id g4BHaeU21008 for ; Sat, 11 May 2002 13:36:40 -0400 Message-Id: <200205111736.g4BHaeU21008@sarg.ryerson.ca> To: caml-list@inria.fr Subject: Re: [Caml-list] Suggestion about balanced trees in stdlib In-reply-to: Your message of "Sat, 11 May 2002 19:18:18 +0200." <20020511171818.GA6384@cs.unibo.it> User-Agent: EMH/1.10.0 SEMI/1.13.7 (Awazu) CLIME/1.13.6 (=?ISO-2022-JP?B?GyRCQ2YlTj4xGyhC?=) MULE XEmacs/21.1 (patch 14) (Cuyahoga Valley) (alpha-redhat-linux) MIME-Version: 1.0 (generated by SEMI 1.13.7 - "Awazu") Content-Type: text/plain; charset=US-ASCII Date: Sat, 11 May 2002 13:36:39 -0400 From: Dave Mason Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk A less-dirty idea: Sorry, I scanned Gerd's comment and deleted it. I agree unifying Set and Map would be good, but don't like the idea of *increasing* the size of an existing module's data structure. And I'm not crazy about Stefano's dirty trick. :-) Gerd suggested that the int weighting factor could be turned into a constructor. Doing that would save the word that making a Set be a unit Map would cost, so Set would be the same size as now, Map would be smaller, and they'd be integrated. (Yes, you could make Set yet smaller, but this way that complexity (of constructors) is only in one place. You could also save that extra word, and make it a little faster with the ugly trick of using recursive records, where a record that points to itself is the sentinel for Empty... but then the = operation becomes non-terminating, so this isn't something that I think is worth it in a stdlib kind of module. Sorry if I missed something, and this is senseless mumbling... ../Dave ------------------- 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