From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id A7C3DBB91 for ; Wed, 26 Jan 2005 16:35:12 +0100 (CET) Received: from smtp1.wanadoo.fr (smtp1.wanadoo.fr [193.252.22.30]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j0QFZCls023717 for ; Wed, 26 Jan 2005 16:35:12 +0100 Received: from me-wanadoo.net (mail.local.net [127.0.0.1]) by mwinf0104.wanadoo.fr (SMTP Server) with ESMTP id 423F11FFFF60 for ; Wed, 26 Jan 2005 16:35:12 +0100 (CET) Received: from nono (ARouen-106-1-40-157.w80-13.abo.wanadoo.fr [80.13.225.157]) by mwinf0104.wanadoo.fr (SMTP Server) with SMTP id EB0441FFFFD6 for ; Wed, 26 Jan 2005 16:35:11 +0100 (CET) X-ME-UUID: 20050126153511962.EB0441FFFFD6@mwinf0104.wanadoo.fr Message-ID: <003d01c503bc$dea027a0$0100a8c0@mshome.net> From: =?iso-8859-1?Q?Fr=E9d=E9ric_Gava?= To: References: <727068A7-6F2C-11D9-8411-0003939A19AA@fas.harvard.edu> <200501260913.09018.jon@jdh30.plus.com> Subject: Re: [Caml-list] 'a Set? Date: Wed, 26 Jan 2005 16:36:56 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 X-Miltered: at concorde with ID 41F7B8B0.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; gava:01 gava:01 caml-list:01 functor:01 coherence:01 stdlib:01 semantics:01 elt:01 higher-order:01 cheers:01 cheers:01 ....:98 interfaces:01 interfaces:01 functions:01 X-Spam-Checker-Version: SpamAssassin 3.0.0 (2004-09-13) on yquem.inria.fr X-Spam-Status: No, score=2.3 required=5.0 tests=DNS_FROM_RFC_ABUSE, DNS_FROM_RFC_POST,DNS_FROM_RFC_WHOIS,FORGED_RCVD_HELO autolearn=disabled version=3.0.0 X-Spam-Level: ** Hi, > Compared to a flat set of functions, the functor approach has the advantage of > enforcing a consistently used compare function. Ok, I am agree. It is just a remark about coherence of names of functions and interfaces of the modules in the stdlib. There is many ModuleName.S interfaces. Have the same names for functions that have the same semantics seems (to me) a good things. (for example, have a function cardinal in the module Map, even if we could implemented this with a fold; the cardinal function of the Sets are could also be implemented with a fold) >The same effect can be > achieved with "elt = 'a" by writing a higher-order function which returns a > record containing the Set.* functions using the given function argument as > the compare function. Something equivalent to this: > > type 'a t = 'a list >.... > Cheers, > Jon. Ok. I am also agree. But the complexity is the problem of this data structure ;-) Cheers, Frédéric Gava