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 1A049BC48 for ; Wed, 6 Apr 2005 20:59: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 j36Ix3cc021699 for ; Wed, 6 Apr 2005 20:59:03 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA15468 for ; Wed, 6 Apr 2005 20:59:03 +0200 (MET DST) Received: from furbychan.cocan.org (furbychan.cocan.org [80.68.91.176]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j36Ix28W003717 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO) for ; Wed, 6 Apr 2005 20:59:03 +0200 Received: from rich by furbychan.cocan.org with local (Exim 3.35 #1 (Debian)) id 1DJFjy-0001f2-00 for ; Wed, 06 Apr 2005 19:59:02 +0100 Date: Wed, 6 Apr 2005 19:59:02 +0100 Cc: caml-list@inria.fr Subject: Re: [Caml-list] ambitious proposal: polymorphic arithmetics Message-ID: <20050406185901.GA6338@furbychan.cocan.org> References: <20050406.111505.68543084.eijiro_sumii@anet.ne.jp> <20050406155608.GA17518@furbychan.cocan.org> <42541195.8030807@jetbrains.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <42541195.8030807@jetbrains.com> User-Agent: Mutt/1.3.28i From: Richard Jones X-Miltered: at concorde with ID 42543177.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 42543176.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 lomov:01 g'caml:01 constructors:01 non-uniform:01 simulate:01 notepad:01 wrote:01 wrote:01 polymorphic:01 polymorphic:01 dmitry:01 data:02 types:02 types:02 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: On Wed, Apr 06, 2005 at 08:43:01PM +0400, Dmitry Lomov wrote: > 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". Pardon _my_ ignorance. I read something about using GADTs to simulate class types in the paper, and assumed that they are equivalent, but I'm probably wrong. Rich. -- Richard Jones, CTO Merjis Ltd. Merjis - web marketing and technology - http://merjis.com Team Notepad - intranets and extranets for business - http://team-notepad.com