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 84E28BB84 for ; Mon, 14 Jul 2008 16:38:18 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAC8Be0iCNhAB/2dsb2JhbACqYw X-IronPort-AV: E=Sophos;i="4.30,359,1212357600"; d="scan'208";a="15095782" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 14 Jul 2008 16:38:18 +0200 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 m6EEcFrk029259 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 14 Jul 2008 16:38:18 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApoEAC8Be0iCNhAB/2dsb2JhbACqYw X-IronPort-AV: E=Sophos;i="4.30,359,1212357600"; d="scan'208";a="15095779" Received: from kurims.kurims.kyoto-u.ac.jp ([130.54.16.1]) by mail3-smtp-sop.national.inria.fr with ESMTP; 14 Jul 2008 16:38:16 +0200 Received: from localhost (silicon [130.54.16.72]) by kurims.kurims.kyoto-u.ac.jp (8.13.8/8.13.8) with ESMTP id m6EEc6wA020634; Mon, 14 Jul 2008 23:38:06 +0900 (JST) Date: Mon, 14 Jul 2008 23:38:06 +0900 (JST) Message-Id: <20080714.233806.68558997.keiko@kurims.kyoto-u.ac.jp> To: rich@annexia.org Cc: caml-list@inria.fr Subject: Re: [Caml-list] Why can't immediate objects be extended? From: Keiko Nakata In-Reply-To: <20080712141200.GA8634@annexia.org> References: <20080712141200.GA8634@annexia.org> 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 487B64D7.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; syntax:01 syntax:01 extensible:01 extensible:01 caml-list:01 inherit:01 caml:02 caml:02 essentially:02 objects:02 objects:02 problem:05 problem:05 manual:06 manual:06 Hello. > I'm wondering if there's a reason why one cannot inherit from > immediate objects? (See description at: > http://caml.inria.fr/pub/docs/manual-ocaml/manual005.html#ss:immediate-objects) > Is it just a syntax problem because the 'inherit' keyword currently > needs to take a class type, or is there a deeper reason? I do not think it is a syntax problem. Here is my understanding: The type of a class and the type of an immediate object are essentially different. In other words, the self type of a class is open, thus extensible; the self type of an immediate object is closed, thus not extensible. As written at: http://caml.inria.fr/pub/docs/manual-ocaml/manual005.html#ss:immediate-objects) the difference gives you different advantages; I suspect this is one reason. Best regards, Keiko