From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 96C83BC8E for ; Wed, 16 Feb 2005 02:21:29 +0100 (CET) Received: from nutty.inf.ed.ac.uk (nutty.inf.ed.ac.uk [129.215.216.3]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j1G1LTYQ006927 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 16 Feb 2005 02:21:29 +0100 Received: from [129.215.96.135] (dhcp-96-135.dcs.ed.ac.uk [129.215.96.135]) by nutty.inf.ed.ac.uk (8.12.8/8.12.8) with ESMTP id j1G1LSpH021165 for ; Wed, 16 Feb 2005 01:21:28 GMT Mime-Version: 1.0 (Apple Message framework v619.2) In-Reply-To: <20050216.093635.226803934.garrigue@math.nagoya-u.ac.jp> References: <7bf1f3b95c18eeda0ed169eb7f73d6f0@urbanet.ch> <20050216.093635.226803934.garrigue@math.nagoya-u.ac.jp> Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <86796353528dde143b07545f7e94ed17@urbanet.ch> Content-Transfer-Encoding: 7bit From: Gilles Dubochet Subject: Re: [Caml-list] Polymorphic variant typing Date: Wed, 16 Feb 2005 01:21:28 +0000 To: caml-list@yquem.inria.fr X-Mailer: Apple Mail (2.619.2) X-Miltered: at nez-perce with ID 4212A019.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 variants:01 ocaml:01 remy's:01 inference:01 polymorphism:01 wwwfun:01 avoiding:01 algebra:01 ocaml:01 remy's:01 avoiding:01 o'caml:01 model:01 variants:01 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: Thanks: that was exactly what I was looking for. > The reason is simple enough: variants in ocaml are not based on Remy's > rows, but on a type system with kinded variables, more in Ohori's > style. > This is described in detail in "Simple type inference for structural > polymorphism", which you can find at > http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/papers/ > > The main reason for this choice is avoiding making rows explicit, > i.e. having a multi-sorted type algebra. Note also that ocaml object > types, while originally based on Remy's system, are hiding their > row-variables, and can be described in the same formalism. Just to make it crystal clear for me: You say that the "main reason for this choice is avoiding making rows explicit", does this mean that the O'Caml team feels that row-based type information is too complicated for an average user since you either steer away of hide it in an object model? > Pragmatic reasons for this choice are given in Section 3 of > "Typing deep pattern-matching in presence of polymorphic variants" > which you can find at the same place. Sincerely, Gilles Dubochet.