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 mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 5DDD7BBCA for ; Fri, 29 Feb 2008 16:58:12 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAACi6x0fAXQInh2dsb2JhbACQcAEBAQgKKZxJ X-IronPort-AV: E=Sophos;i="4.25,427,1199660400"; d="scan'208";a="9754253" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 29 Feb 2008 16:58:11 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m1TFw8R7017197 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Fri, 29 Feb 2008 16:58:11 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAM+6x0eCNhAB/2dsb2JhbACtdA X-IronPort-AV: E=Sophos;i="4.25,427,1199660400"; d="scan'208";a="8789028" Received: from kurims.kurims.kyoto-u.ac.jp ([130.54.16.1]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Feb 2008 16:58:10 +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 m1TFw7RV005003 for ; Sat, 1 Mar 2008 00:58:08 +0900 (JST) Date: Sat, 01 Mar 2008 00:58:07 +0900 (JST) Message-Id: <20080301.005807.125113032.keiko@kurims.kyoto-u.ac.jp> To: caml-list@inria.fr Subject: Re: [Caml-list] OO programming From: Keiko Nakata In-Reply-To: <47C81829.4010505@free.fr> References: <20080227.103733.43387508.garrigue@math.nagoya-u.ac.jp> <20080228.173429.68546494.keiko@kurims.kyoto-u.ac.jp> <47C81829.4010505@free.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 47C82B90.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; functors:01 recursive:01 functors:01 camlp:01 syntax:01 camlp:01 jacques's:01 verbose:01 duplications:98 ideally:01 extensible:01 caml-list:01 modules:02 modules:02 structures:02 > > Since there are some people (including me) > > who are interested in using functors and recursive modules > > in the style of object-oriented context, > > > Do you mean including classes in functors, as Jacques Garrigue > described, or using modules like classes ? The former; to include classes in functors. > > I thought that it could be useful to devise > > a (camlp4) syntax extension which mitigates this a bit painful verbosity. > camlp4 extensions may help. I already used some for objects (related to > initializers), and I plan to investigate it further, possibly borrowing > code from Jacques Garrigue. In the context of functors, the problem is > that a lot of code would probably remain specific and still need to be > written by hand, for example, the row types for classes... As I see Jacques's code, he gradually extends the module type S to S' and S''. Type declarations in module types and type definitions in structures involving types event, observer and subject are duplicated everywhere with slight modifications. Why can we not extend the previously defined module type in a less verbose way? We may still need to write row types by hand. But I think we should (ideally) do it in a extensible way without duplications. With best regards, Keiko