From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 86735BB9C for ; Fri, 25 Nov 2005 07:13:44 +0100 (CET) Received: from mail23.sea5.speakeasy.net (mail23.sea5.speakeasy.net [69.17.117.25]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id jAP6DgHE027113 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 25 Nov 2005 07:13:43 +0100 Received: (qmail 2135 invoked from network); 25 Nov 2005 06:13:41 -0000 Received: from shell2.sea5.speakeasy.net ([69.17.116.3]) (envelope-sender ) by mail23.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 25 Nov 2005 06:13:41 -0000 Date: Thu, 24 Nov 2005 22:13:41 -0800 (PST) From: brogoff To: skaller Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] pattern match on class? In-Reply-To: <1132775561.25948.20.camel@rosella> Message-ID: References: <1132775561.25948.20.camel@rosella> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at nez-perce with ID 4386AB96.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 abstraction:01 variants:01 ocaml's:01 abstraction:01 wrote:01 polymorphic:01 speakeasy:01 data:02 data:02 match:02 match:02 objects:02 objects:02 types:02 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Thu, 24 Nov 2005, skaller wrote: > We have anonymous objects now .. but can one pattern > match on a class as one can on a record? No. But pattern matching is the enemy of data abstraction, and we did get private row types, which allow polymorphic variants and classes to play a bit more nicely with OCaml's data abstraction facilities. I'm not sure why you thought that there was a relationship between anonymous objects and pattern matching. The question which pops into my mind is, "Now that we have anonymous objects, when will we have delegation?" but even more than that I wonder about the many other features that have been discussed that could be used in place of objects and classes. -- Brian