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 C85DFBC48 for ; Thu, 7 Apr 2005 16:02:22 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j37E2LXK023741 for ; Thu, 7 Apr 2005 16:02:22 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA06430 for ; Thu, 7 Apr 2005 16:02:21 +0200 (MET DST) 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 j37E2Lc2023737 for ; Thu, 7 Apr 2005 16:02:21 +0200 Received: from poincare (mathwifi.swapping.umh.ac.be [10.102.100.18]) by hedwig1.umh.ac.be (8.13.1/8.13.1) with ESMTP id j37E2B5d1171510; Thu, 7 Apr 2005 16:02:21 +0200 Received: from localhost ([127.0.0.1] ident=trch) by poincare with esmtp (Exim 4.50) id 1DJXZK-0001Na-53; Thu, 07 Apr 2005 16:01:14 +0200 Date: Thu, 07 Apr 2005 16:00:58 +0200 (CEST) Message-Id: <20050407.160058.05106726.debian00@tiscali.be> To: caml-list@inria.fr Cc: eijiro_sumii@anet.ne.jp, sumii@saul.cis.upenn.edu Subject: Re: [Caml-list] ambitious proposal: polymorphic arithmetics From: Christophe TROESTLER In-Reply-To: <20050406.145019.90114474.eijiro_sumii@anet.ne.jp> References: <20050406.111505.68543084.eijiro_sumii@anet.ne.jp> <20050406163915.GC15547@force.stwing.upenn.edu> <20050406.145019.90114474.eijiro_sumii@anet.ne.jp> <20050406.152040.95498514.eijiro_sumii@anet.ne.jp> Organization: Universite de Mons-Hainaut (http://math.umh.ac.be/an/) X-Spook: propaganda AIMSX MD2 Merlin Taiwan Uzi Commecen Crowell kibo MDA 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 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 42553D6D.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42553D6D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 christophe:01 troestler:01 eijiro:01 sumii:01 eijiro:01 sumii:01 compile-time:01 lovas:01 wlovas:01 stwing:01 upenn:01 drawbacks:01 ocaml:01 ...:98 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, 06 Apr 2005, Eijiro Sumii wrote: > > > But if 1 + 1.2 is going to throw an exception > It doesn't, just as "1 = 1.2" doesn't - they are both compile-time errors. My mistake. Thanks for the correction. > From: "William Lovas" > > Many experts (and perhaps some novices *shrug*) think that polymorphic > > equality is a bad idea... > > I'm almost tempted to agree.:-) As other responses have also > suggested, the issue seems to be "where to draw the line." If so, I > can perhaps restate my question as: why is the line drawn between = > and + now? Is it the best? I'd like to ask from a non-expert standpoint: what would be the advantages and drawbacks of something like type classes for OCaml? Also, how do they compare with GCaml (in terms of flexibility, extensibility, efficiency,...)? Regards, ChriS