From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 36283BC84 for ; Thu, 24 Mar 2005 11:33:18 +0100 (CET) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j2OAXGfw024346 for ; Thu, 24 Mar 2005 11:33:17 +0100 Received: from localhost (suiren [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.13.1/8.13.1) with ESMTP id j2OAXBhS027170; Thu, 24 Mar 2005 19:33:11 +0900 (JST) Date: Thu, 24 Mar 2005 19:33:02 +0900 (JST) Message-Id: <20050324.193302.112811760.garrigue@math.nagoya-u.ac.jp> To: alex@barettadeit.com Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Object Attribute Accessor Syntax Extension From: Jacques Garrigue In-Reply-To: <424281B3.4090807@barettadeit.com> References: <20050324.171322.41200116.garrigue@math.nagoya-u.ac.jp> <424281B3.4090807@barettadeit.com> X-Mailer: Mew version 4.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4242976C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 accessor:01 syntax:01 baretta:01 expr:01 expr:01 syntax:01 ocaml:01 overloading:01 semantics:01 ...:98 wrote:01 syntactic:01 jacques:01 jacques:01 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.2 X-Spam-Level: From: Alex Baretta > Jacques Garrigue wrote: > > > It may also be nice to have another small extension, so that > > o#f <- expr > > would be handled as > > o#set_f <- (expr) > > Doesn't this look dangerously similar to C++? Let us not turn to the > Dark Side of object orientation... I just took the syntax from ruby. Note that both in ocaml and ruby, you cannot access directly object fields, so the above syntax is not ambiguous: it can only be syntactic sugar for a method call. This is not to be mixed with overloading of assignment in C++, which changes the semantics of an existing operator. Jacques Garrigue