From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 3EF95BBAF for ; Fri, 8 Aug 2008 12:57:23 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqECAJfDm0jAXQIniGdsb2JhbACRPgEBAQ8gmUo X-IronPort-AV: E=Sophos;i="4.31,327,1215381600"; d="scan'208";a="15827826" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 08 Aug 2008 12:57:22 +0200 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m78AvMaq018960 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 8 Aug 2008 12:57:22 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnQDANPDm0jUNQVcdGdsb2JhbACRPgEMAgsHEZlL X-IronPort-AV: E=Sophos;i="4.31,327,1215381600"; d="scan'208";a="13824883" Received: from postbode02.versateladsl.be ([212.53.5.92]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 08 Aug 2008 12:57:21 +0200 Received: (qmail 23362 invoked by uid 0); 8 Aug 2008 10:57:16 -0000 Received: from unknown (HELO poincare.swapping.umh.ac.be) ([83.182.200.130]) (envelope-sender ) by smtp.versateladsl.be (qmail-ldap-1.03) with SMTP for < >; 8 Aug 2008 10:57:16 -0000 Received: from [127.0.0.1] (helo=localhost ident=trch) by poincare.swapping.umh.ac.be with esmtp (Exim 4.69) (envelope-from ) id 1KRPep-0003NG-To; Fri, 08 Aug 2008 12:57:19 +0200 Date: Fri, 08 Aug 2008 12:57:19 +0200 (CEST) Message-Id: <20080808.125719.77130066424853568.Christophe.Troestler@umh.ac.be> To: OCaml Mailing List Subject: (In)Equality type specialization From: Christophe TROESTLER Organization: Universite de Mons-Hainaut (http://math.umh.ac.be/an/) X-Face: #2fb%mPx>rRL@4ff~TVgZ"<[:,oL"`TUEGK/[8/qb58~C>jR(x4A+v/n)7BgpEtIph_neoLKJBq0JBY9:}8v|j X-Mailer: Mew version 6.0.51 on Emacs 22.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 489C2692.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; christophe:01 troestler:01 christophe:01 troestler:01 ocaml:01 bool:01 annotations:01 ocaml:01 equality:01 equality:01 compilers:01 umh:01 define:02 argument:02 declaration:02 Hi, Is a declaration like external float_eq : float -> float -> bool = "%equal" considered to be an acceptable way to specialize equality? Type annotations do not work in my case because it may be that one passes [float_eq] as a function argument before evaluating it. I could of course define let float_eq (x:float) y = x = y but it is slightly less efficient. So my question is whether I can expect the external declaration to be robust enough to keep working in future versions of OCaml or whether I should prefer the second (safe) solution which OCaml compilers will eventually optimize. Regards, C.