From: Jacques Garrigue <garrigue@math.nagoya-u.ac.jp>
To: briand@aracnet.com
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] why aren't methods visible inside class definition
Date: Sun, 26 Dec 2004 07:55:25 +0900 (JST) [thread overview]
Message-ID: <20041226.075525.106353835.garrigue@math.nagoya-u.ac.jp> (raw)
In-Reply-To: <16845.45096.849911.709868@soggy.deldotd.com>
From: briand@aracnet.com
> Any particular reason for this ?
>
> After all values are visible so why aren't methods simply treated as
> values which are functions and therefore visible also.
>
> By visible, I mean that methods can nly be accessed using self#method_name
Methods are seen as similar to records fields, so you must be explicit
about the object when calling them.
Also, methods may have no arguments, while functions must have at
least one.
Last, this distinction lets you use the same name for a field and a
method. This is sometimes comfortable.
Jacques Garrigue
next prev parent reply other threads:[~2004-12-25 22:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-12-25 18:23 briand
2004-12-25 22:55 ` Jacques Garrigue [this message]
2004-12-26 9:45 ` [Caml-list] " henri dubois-ferriere
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=20041226.075525.106353835.garrigue@math.nagoya-u.ac.jp \
--to=garrigue@math.nagoya-u.ac.jp \
--cc=briand@aracnet.com \
--cc=caml-list@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