From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 53CF3BC0A for ; Wed, 28 Feb 2007 06:10:01 +0100 (CET) Received: from ipmail01.adl2.internode.on.net (ipmail01.adl2.internode.on.net [203.16.214.140]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1S59w2M014062 for ; Wed, 28 Feb 2007 06:10:00 +0100 Received: from ppp41-119.lns2.syd6.internode.on.net (HELO rosella) ([59.167.41.119]) by ipmail01.adl2.internode.on.net with ESMTP; 28 Feb 2007 15:39:16 +1030 X-IronPort-AV: i="4.14,228,1170595800"; d="scan'208"; a="94739850:sNHT4094757954" Subject: Re: [Caml-list] Fwd: "ocaml_beginners"::[] Trouble combining polymorphic classes and polymorphic methods From: skaller To: Jacques Garrigue Cc: daniel.buenzli@epfl.ch, caml-list@inria.fr In-Reply-To: <20070228.130115.35466734.garrigue@math.nagoya-u.ac.jp> References: <20070228.103403.105433774.garrigue@math.nagoya-u.ac.jp> <1172627876.19033.85.camel@rosella.wigram> <8DF1B76F-AE3B-43F2-9034-7CF47277EE7B@epfl.ch> <20070228.130115.35466734.garrigue@math.nagoya-u.ac.jp> Content-Type: text/plain; charset=utf-8 Date: Wed, 28 Feb 2007 16:09:11 +1100 Message-Id: <1172639351.19033.111.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.6.1 Content-Transfer-Encoding: 8bit X-Miltered: at discorde with ID 45E50EA6.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 buenzli:01 semantics:01 abstraction:01 sourceforge:01 polymorphic:01 polymorphic:01 beginners:01 wrote:01 constructor:01 typing:01 caml-list:01 epfl:02 garrigue:03 theoretical:03 On Wed, 2007-02-28 at 13:01 +0900, Jacques Garrigue wrote: > From: Daniel Bünzli [] > The theoretical problem with structural types is more about very bad > luck: you may be using two libraries, which seem to be using the same > type (same constructor or method names), but actually have different > semantics. This is possible with nominal typing too, it just requires even 'badder' luck .. we probably all know the famous OO example of a 'drawable' abstraction with instance 'gun' :) -- John Skaller Felix, successor to C++: http://felix.sf.net