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,SPF_SOFTFAIL 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 6C2D9BC69 for ; Fri, 23 Feb 2007 17:13:35 +0100 (CET) Received: from mail4.sea5.speakeasy.net (mail4.sea5.speakeasy.net [69.17.117.6]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1NGDXFg024772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Fri, 23 Feb 2007 17:13:34 +0100 Received: (qmail 24708 invoked from network); 23 Feb 2007 16:13:30 -0000 Received: from shell4.sea5.speakeasy.net ([69.17.116.5]) (envelope-sender ) by mail4.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 23 Feb 2007 16:13:30 -0000 Date: Fri, 23 Feb 2007 08:13:29 -0800 (PST) From: brogoff To: caml-list@inria.fr Subject: Re: [Caml-list] Instruction selection in the OCaml compiler: Modules or classes? In-Reply-To: <6CB0D237-F894-4AC3-BDBE-2BB484928D3C@gmail.com> Message-ID: References: <6CB0D237-F894-4AC3-BDBE-2BB484928D3C@gmail.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at concorde with ID 45DF12AD.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 compiler:01 class-based:01 ocaml:01 markus:01 mottl:01 recursive:01 markus:01 subsumed:01 mixin:01 2007,:98 wrote:01 overlap:01 slides:01 experimental:01 On Thu, 22 Feb 2007, Joel Reymont wrote: > The slides seem to favor the class-based solution but then I hear > that classes in OCaml are slow and people like Markus Mottl just > plain despise them :-). What does everyone else opine? It's one of the most interesting issues in the OCaml language design. There is a lot of overlap between the module system, the object system, and to some degree, records. One would think that a language design with fewer features could provide the same powers of parameterization, but modules aren't first class (and the recursive module extension is still an "experimental" feature) and don't support inheritance, records in OCaml are rather weak, and classes don't have type components. I use classes less frequently (but as Markus points out they are for the most part much more pleasant than Java or C++ classes) so my gut feeling is that their abilities should be subsumed in the module system (mixin modules?) and the record system. But that will probably be a new language, ML2040, given the current rate of change of ML :-(. -- Brian