From: Jacques Garrigue <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
Date: Thu, 24 Mar 2005 19:33:02 +0900 (JST) [thread overview]
Message-ID: <20050324.193302.112811760.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <424281B3.4090807@barettadeit.com>
From: Alex Baretta <alex@barettadeit.com>
> 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
prev parent reply other threads:[~2005-03-24 10:33 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-23 20:00 Will M. Farr
2005-03-24 8:13 ` [Caml-list] " Jacques Garrigue
2005-03-24 9:00 ` Alex Baretta
2005-03-24 10:33 ` Jacques Garrigue [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050324.193302.112811760.garrigue@math.nagoya-u.ac.jp \
--to=garrigue@math.nagoya-u.ac.jp \
--cc=alex@barettadeit.com \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox