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 8DAC3BC48 for ; Wed, 6 Apr 2005 18:43:04 +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 j36Gh4X3005168 for ; Wed, 6 Apr 2005 18:43:04 +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 SAA09988 for ; Wed, 6 Apr 2005 18:43:03 +0200 (MET DST) Received: from mail.intellij.net (mail.intellij.net [213.182.181.98]) by concorde.inria.fr (8.13.0/8.13.0) with SMTP id j36Gh278005165 for ; Wed, 6 Apr 2005 18:43:03 +0200 Received: (qmail 23912 invoked by uid 89); 6 Apr 2005 16:43:02 -0000 Received: from unknown (HELO ?192.168.1.43?) (dsl@intellij.net@192.168.1.43) by mail.intellij.net with SMTP; 6 Apr 2005 16:43:02 -0000 Message-ID: <42541195.8030807@jetbrains.com> Date: Wed, 06 Apr 2005 20:43:01 +0400 From: Dmitry Lomov Organization: JetBrains Inc. User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] ambitious proposal: polymorphic arithmetics References: <20050406.111505.68543084.eijiro_sumii@anet.ne.jp> <20050406155608.GA17518@furbychan.cocan.org> In-Reply-To: <20050406155608.GA17518@furbychan.cocan.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 42541198.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 42541197.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; lomov:01 lomov:01 caml-list:01 g'caml:01 constructors:01 non-uniform:01 wrote:01 polymorphic:01 polymorphic:01 dmitry:01 dmitry:01 data:02 types:02 hack:03 problem:05 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: Richard Jones wrote: > The problem, I'm guessing, is that you add polymorphic +, -, and so > on. But that's really just a hack in the language. Sooner or later > people are going to ask why it's not possible to write a polymorphic > 'print' function, _without_ hacking the language some more. At that > point you need a theory, and you need something like G'Caml, or type > classes, or GADTS. Pardon my ignorance, but how are GADTs are going to help in this regard? I thought GADTs are basically data types with constructors that have non-uniform "return type". Friendly, Dmitry -- Dmitry Lomov JetBrains Inc. http://www.jetbrains.com "Develop With Pleasure!"