From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id F28CC7F75C for ; Thu, 11 Sep 2014 10:24:19 +0200 (CEST) X-IronPort-AV: E=Sophos;i="5.04,504,1406584800"; d="scan'208";a="94091847" Received: from meleze.ens.fr (HELO [129.199.99.114]) ([129.199.99.114]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES128-SHA; 11 Sep 2014 10:24:19 +0200 Message-ID: <54115C33.4050408@inria.fr> Date: Thu, 11 Sep 2014 10:24:19 +0200 From: Francois Berenger User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.0 MIME-Version: 1.0 To: caml-list@inria.fr References: <54101221.3010304@users.sourceforge.net> <1410348425.3003.11.camel@thinkpad> <5410BB11.2070406@users.sourceforge.net> <5411533C.6060802@inria.fr> <5411590D.2050508@users.sourceforge.net> In-Reply-To: <5411590D.2050508@users.sourceforge.net> Content-Type: text/plain; charset=iso-8859-15; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Clarification for the configuration of comparison functions On 09/11/2014 10:10 AM, SF Markus Elfring wrote: >>> Would you like to suggest any changes for the affected member functions? >>> https://github.com/elfring/OTCL/blob/51c5a0ff8b487cddc9318cac63c59bd5c23ae547/omap.ml#L121 >> >> Are you sure about the compare on line 66? > > No! - I do not feel familiar enough with the programming language "OCaml" so far > to decide changes here on my own. > > ... > let rec add ~cmp x data = function > ... > let c = compare x v in > ... > > That is one of the places where I have found a code smell. It is an > implementation detail for which I published the bug report "Comparison function > application" and started a corresponding clarification try on IRC and the > mailing list. > https://github.com/elfring/OTCL/issues/4 > > Should the shown function name be replaced by a call for "~cmp"? Probably, but I am also not familiar with this code base. > Regards, > Markus