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=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 9DD61BC6B for ; Thu, 18 Oct 2007 17:14:26 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAAsVF0fRVYC4nmdsb2JhbACOTQIBAQcEBhEYgSc X-IronPort-AV: E=Sophos;i="4.21,295,1188770400"; d="scan'208";a="18221917" Received: from fk-out-0910.google.com ([209.85.128.184]) by mail4-smtp-sop.national.inria.fr with ESMTP; 18 Oct 2007 17:14:26 +0200 Received: by fk-out-0910.google.com with SMTP id b27so202897fka for ; Thu, 18 Oct 2007 08:14:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; bh=WZkEA4vND+C4yyj55YiNv0J10dJ53wVpQG3KJkvohRE=; b=LPnTo0PNqY8SgfeDVS+oj0BymWta6MBmaTQV9cvcEdBrnDlsvt3rt6UzGr3iMcpwaJesJlX7IGZD0moBpnbzNAh+Vbj1OBZ1QFh4edszZKmNUzh1nM5SHksdW4A4n9I+i/6zaANfVzuVr2EP/NEqWgd78OjdiDD3A07kaf0DGUM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=b15s87IFL1q8Jd7SCZWdDPyaCGsUyxpvKZ0zKqsiT3gi/Ax5/eXbt5PpA3pY5DA/GJuVnpVwoR7M1OBLPl/4TeNmIK7uwuD5n6XzCJmCmaEllJjxynBpEyO+1gcLT0g4tJgv/TQRq2Fqm+IeQqlmfvWCp8+LWHhUCcAsqfytY6A= Received: by 10.82.138.6 with SMTP id l6mr1296405bud.1192720464906; Thu, 18 Oct 2007 08:14:24 -0700 (PDT) Received: from ?192.168.0.5? ( [87.88.165.197]) by mx.google.com with ESMTPS id y2sm2190739mug.2007.10.18.08.14.21 (version=SSLv3 cipher=RC4-MD5); Thu, 18 Oct 2007 08:14:22 -0700 (PDT) Message-ID: <4717784B.1000305@lix.polytechnique.fr> Date: Thu, 18 Oct 2007 17:14:19 +0200 From: Arnaud Spiwack User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Smells like duck-typing References: <377673.31302.qm@web54602.mail.re2.yahoo.com> <47176B4A.5000807@janestcapital.com> <47176DB6.7090700@lix.polytechnique.fr> <471771A7.3010402@janestcapital.com> <47177585.6030208@lix.polytechnique.fr> <471776AB.2050109@fischerventure.com> In-Reply-To: <471776AB.2050109@fischerventure.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Sender: Arnaud Spiwack X-Spam: no; 0.00; lix:01 supertype:01 haskell-like:01 arnaud:01 arnaud:01 caml-list:01 suggestion:03 inheritance:03 suggests:04 ecrit:06 clue:06 reasoning:07 nope:08 mathematical:08 dismiss:09 Robert Fischer a écrit : > >> You don't invent them, they exist. I can't agree to dismiss this >> suggestion without further thought. It might end up being >> non-sensical, maybe not. It merely suggests a way, to derive new >> values, whose type happen to be a supertype of the original one. Why >> not ? It may be considered to the Haskell-like "derive" feature, and >> such. It is just a way to build new values out of known one. >> > Formally, can you explain what you're looking for here, and how it's > not congruent with inheritance? > > ~~ Robert. Nope. Absolutely not :p . I wouldn't have a clue of what it should formally look like, since again I can't find any example of mathematical reasoning using that, I have no intuition at all. But it's not impossible that there is a good way to make/read such a feature, that's just what I am stating. Arnaud Spiwack