From: "Николай Ципанов" <nicholas@post.tepkom.ru>
To: Caml list <caml-list@pauillac.inria.fr>
Subject: self in classes
Date: Sat, 6 Feb 1999 17:09:54 +0300 (MSK) [thread overview]
Message-ID: <Pine.LNX.4.03.9901151302590.11682-100000@post.tepkom.ru> (raw)
Hi!
Are there any ways to call the methods of other objects with self as an
argument ?
I mean situation like that:
class foo = object (self)
val observers : bar list = []
method register =
Array.iter (function o -> o#register self ) observers
.... ^^^^^^^^^^^^^^^^^^
end
class bar = object
method register ob =
(* add something *)
end
When i'm trying to write something like that ocamlc says me that
self canot escape of it's definition
next reply other threads:[~1999-02-08 8:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-06 14:09 Николай Ципанов [this message]
1999-02-08 10:34 ` Didier Remy
1999-02-08 12:21 ` Jerome Vouillon
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=Pine.LNX.4.03.9901151302590.11682-100000@post.tepkom.ru \
--to=nicholas@post.tepkom.ru \
--cc=caml-list@pauillac.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