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 2F247BCAF for ; Wed, 29 Jun 2005 15:37:01 +0200 (CEST) Received: from hedwig1.umh.ac.be (hedwig2.umh.ac.be [193.190.193.73]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j5TDb01K013149 for ; Wed, 29 Jun 2005 15:37:01 +0200 Received: from poincare (mathwifi.swapping.umh.ac.be [10.102.100.188]) by hedwig1.umh.ac.be (8.13.1/8.13.1) with ESMTP id j5TDX0VP930000; Wed, 29 Jun 2005 15:33:00 +0200 Received: from localhost ([127.0.0.1] ident=trch) by poincare with esmtp (Exim 4.50) id 1Dncfs-0006Uw-Gx; Wed, 29 Jun 2005 15:32:20 +0200 Date: Wed, 29 Jun 2005 15:32:10 +0200 (CEST) Message-Id: <20050629.153210.99062320.debian00@tiscali.be> To: jon@ffconsultancy.com Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Type abstraction and (polymorphic) equality From: Christophe TROESTLER In-Reply-To: <200506291012.30612.jon@ffconsultancy.com> References: <20050629.023111.15476874.debian00@tiscali.be> <200506291012.30612.jon@ffconsultancy.com> Organization: Universite de Mons-Hainaut (http://math.umh.ac.be/an/) X-Spook: Agfa Sundevil Honduras BLU-97 A/B broadside lynch IMF Maple Mole benelux X-Blessing: Om Ah Hum Vajra Guru Pema Siddhi Hum X-Operating-System: GNU/Linux (http://www.linux.org/) X-Mailer-URL: http://www.mew.org/ X-Mailer: Mew version 4.2.51 on Emacs 21.4 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.1 (www dot roaringpenguin dot com slash mimedefang) X-Miltered: at concorde with ID 42C2A3FC.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 abstraction:01 christophe:01 troestler:01 compilation:01 compilation:01 compiler:01 trade-off:01 ocaml's:01 mlton:01 marshalling:01 overloading:01 u-tokyo:01 furuse:01 cheers:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.5 required=5.0 tests=FROM_ENDS_IN_NUMS autolearn=disabled version=3.0.2 X-Spam-Level: On Wed, 29 Jun 2005, Jon Harrop wrote: > > > - One introduces the same capability of providing a special equality > > (comparison) for certain types but, during compilation, "expand" > > functions till the type for "=" is given by known functions > > (something like a "generic" equality). I guess however that that > > may cause problems with separate compilation... > > Yes. It seems that this kind of thing is best done by a MLton-like > compiler. If this is a trade-off then I prefer OCaml's current > position - MLton is an order of magnitude slower to compile small > programs, no dynamic code loading, no marshalling etc. Well I was more thinking of overloading equality in a GCaml manner (http://www.yl.is.s.u-tokyo.ac.jp/~furuse/gcaml/) which offers you more, not less. However, I do not know how much GCaml actually tries to reduce the performance hit by compiling monomorphically whenever possible... Cheers, ChriS