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=0.0 required=5.0 tests=none 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 F3E3BBBC1 for ; Tue, 4 Mar 2008 15:00:55 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAHLkzEfAXQInh2dsb2JhbACQcwEBAQgKKYENmm4 X-IronPort-AV: E=Sophos;i="4.25,444,1199660400"; d="scan'208";a="8930998" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 04 Mar 2008 15:00:55 +0100 Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m24E0tHj007272 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Tue, 4 Mar 2008 15:00:55 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAHLkzEeCNhAB/2dsb2JhbACSPppu X-IronPort-AV: E=Sophos;i="4.25,444,1199660400"; d="scan'208";a="9861399" Received: from kurims.kurims.kyoto-u.ac.jp ([130.54.16.1]) by mail3-smtp-sop.national.inria.fr with ESMTP; 04 Mar 2008 15:00:53 +0100 Received: from localhost (orion [130.54.16.5]) by kurims.kurims.kyoto-u.ac.jp (8.13.8/8.13.8) with ESMTP id m24E0pwu008758 for ; Tue, 4 Mar 2008 23:00:52 +0900 (JST) Date: Tue, 04 Mar 2008 23:00:51 +0900 (JST) Message-Id: <20080304.230051.68555926.keiko@kurims.kyoto-u.ac.jp> To: caml-list@inria.fr Subject: Re: [Caml-list] OO programming From: Keiko Nakata In-Reply-To: <47CC5092.1050100@irisa.fr> References: <47CBC7AB.9000601@free.fr> <20080304.001809.125117537.keiko@kurims.kyoto-u.ac.jp> <47CC5092.1050100@irisa.fr> X-Mailer: Mew version 4.2 on Emacs 20.7 / Mule 4.1 (AOI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 47CD5617.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; parametric:01 'self:01 camlp:01 jacques's:01 ocaml:01 variants:01 inference:01 ocaml:01 polymorphic:01 typing:01 caml-list:01 caml:02 objects:02 defining:02 tend:03 Hello. > > Parametric class type definitions should be helpful. > > We might need as many type parameters as (class) type definitions involved; > > do you think this can be problematic, > > particularly in respect of type error messages? > > > Only experiments can tell us. But I suspect that using a systematic > scheme for defining classes and relating them to each other should avoid > users to make too many errors that come from a misunderstanding of the > type system ('self escaping its scoope, or unified wit a closed type, > etc.), thus allowing "advanced" use of caml objects by non type systems > experts (including me). Boilerplates that help us avoid typing errors... That sounds nice. > I plan to do some reasonable scale "OOcaml" coding (in my spare time) > for some project. I will first see if I can use some systematic scheme > successfully before I try anything with camlp4. I also look for how I can minimize in a (hopefully) intuitive way Jacques's code, avoiding bizarre code duplication. Please let me know when you have good news. > That said, some of us > tend to think of everything only from within ocaml, and I know that some > day I should give a try to other systems, like Scala and its "traits". I am sure you can enjoy exotic time if you try to exploit Scala's goodies :-) In respect of the exact subject we have been discussing, Scala may be more adapted. As far as I am concerned, fortunately(?), polymorphic variants and type inference and other many many goodies of OCaml keep me from turning to another language. Best, Keiko