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.1 required=5.0 tests=AWL,DNS_FROM_RFC_BOGUSMX autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 123AABC69 for ; Thu, 18 Oct 2007 18:07:53 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAKUhF0dAahQhh2dsb2JhbACOTQIBCAopgSc X-IronPort-AV: E=Sophos;i="4.21,296,1188770400"; d="scan'208";a="3213698" Received: from mail.cs.unm.edu ([64.106.20.33]) by mail1-smtp-roc.national.inria.fr with ESMTP; 18 Oct 2007 18:07:52 +0200 Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.cs.unm.edu (Postfix) with ESMTP id DB84BE41C6; Thu, 18 Oct 2007 10:07:50 -0600 (MDT) Received: from mail.cs.unm.edu ([127.0.0.1]) by localhost (mail [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 01900-01; Thu, 18 Oct 2007 10:07:50 -0600 (MDT) Received: from cs.unm.edu (webmail.cs.unm.edu [64.106.20.39]) by mail.cs.unm.edu (Postfix) with ESMTP id 332FEE41C5; Thu, 18 Oct 2007 10:07:50 -0600 (MDT) From: "William D. Neumann" To: "Loup Vaillant" Cc: caml-list@yquem.inria.fr, Stefano Zacchiroli Subject: Re: [Caml-list] Smells like duck-typing Date: Thu, 18 Oct 2007 11:08:01 -0500 Message-Id: <20071018160003.M79494@cs.unm.edu> In-Reply-To: <6f9f8f4a0710180847g23edadf5t1cdc7295e07cebf7@mail.gmail.com> References: <377673.31302.qm@web54602.mail.re2.yahoo.com> <471774AA.5000109@fischerventure.com> <20071018150419.M82068@cs.unm.edu> <6f9f8f4a0710180847g23edadf5t1cdc7295e07cebf7@mail.gmail.com> X-Mailer: Open WebMail 2.50 20050106 X-OriginatingIP: 205.175.225.22 (wneumann) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 X-Virus-Scanned: by amavisd-new-20030616-p10 (Debian) at cs.unm.edu X-Spam: no; 0.00; 0200,:01 subtyping:01 snippets:01 wrote:01 syntactic:01 caml-list:01 inherit:01 inherit:01 reuse:01 caml:02 objective:02 neumann:02 neumann:02 inheriting:02 inheritance:03 On Thu, 18 Oct 2007 17:47:45 +0200, Loup Vaillant wrote > It feels like the problem is the keyword "inherit". It suggest > C++/Java subtyping, while we just want code reuse. If having stories > inheriting from one another eventually result in less code, I would > consider that cleaner, no matter what "inherit" is supposed to mean. > > Sometimes, a tool can be good at something it has not be designed > for. I think this might be the case, here. Oh, I absolutely agree there. And there are a couple of important snippets of the manual that seem to apply: "Note that the relation between object, class and type in Objective Caml is very different from that in main stream object-oriented languages like Java or C++, so that you should not assume that similar keywords mean the same thing." and "Inheritance is a syntactic relation between classes..." -- William D. Neumann