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.9 required=5.0 tests=DNS_FROM_RFC_ABUSE, 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 concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 0AD55BC6D for ; Fri, 25 Aug 2006 09:51:13 +0200 (CEST) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.182]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id k7P7pBlD006864 for ; Fri, 25 Aug 2006 09:51:12 +0200 Received: by py-out-1112.google.com with SMTP id d42so851029pyd for ; Fri, 25 Aug 2006 00:51:11 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=SafXoPMpX56CQBvlxc679r2lBjkEg4rgciAoEzIjeqoEbTlj+N0dQ1YQwgUJKh1qGv+jvvjHtYpV4YebM7CRE/XOQQRCLoHLAHOQjFQVQrB/tuIiZvNEy3ee6Hoz+6aFrHbt4i0COwmDNoyCZTx/umedZ7vcabMeMRtxW8hEeL4= Received: by 10.35.127.7 with SMTP id e7mr4483645pyn; Fri, 25 Aug 2006 00:51:11 -0700 (PDT) Received: by 10.35.76.13 with HTTP; Fri, 25 Aug 2006 00:51:11 -0700 (PDT) Message-ID: <53c655920608250051x48d81cbagabf8039f0269beee@mail.gmail.com> Date: Fri, 25 Aug 2006 09:51:11 +0200 From: "David Baelde" Reply-To: david.baelde@ens-lyon.org To: Ocaml Subject: Class/prototype-based OO MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-j-chkmail-Score: MSGID : 44EEABEF.002 on concorde : j-chkmail score : X : 0/20 1 X-Miltered: at concorde with ID 44EEABEF.002 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; subtyping:01 ocaml:01 class-based:01 ocaml:01 trivial:01 cheers:01 class-based:01 oop:01 authors:02 programming:03 identically:03 languages:03 dynamic:03 dynamic:03 static:03 Hi list, After having had to learn Java, I was annoyed by the lack of subtyping compared to OCaml. In Java two identical classes with different names cannot be used identically. I then re-read Wikipedia's articles on prototype-based [1] and class-based [2] OO. I used to be convinced that OCaml was cited in the first category. It is not the case, and I see now that the question is not trivial. It is said that prototype-based OO is criticized for being too dynamic, I believe that OCaml style of OO is an example of static language having at least the most interesting features of prototype-based OO. Any opinion? If I remember well, I didn't like the duck-typing article either, which authors didn't seem to know OCaml. Our language makes the boundary between static and dynamic languages more complex. Cheers. -- David [1] http://en.wikipedia.org/wiki/Prototype-based_programming [2] http://en.wikipedia.org/wiki/Class-based_OOP