From: Sylvain Kerjean <skerjean@irisa.fr>
To: caml-list@inria.fr
Subject: classes mutually recursive
Date: Mon, 29 Jan 2001 11:15:39 +0100 [thread overview]
Message-ID: <3A7542CB.6731EBDC@irisa.fr> (raw)
I have to program a class A whose method m produces an object of class
B,with the property that B inherits from A :
class A =
...
method m = new B
...
end;;
class B =
...
inherit A
...
end;;
Of course it leads to a type clash, but as the manual exhibits an
example of the observer/notifier
problem, if someone could explain me a little more about a trick to get
the behaviour i need, it would be very kind !!
PS : sorry for my poor english, and no i can not change my architecture
of classes cause i interface an existing API (for those who are
interested, it is the architecture of the BHandler/BLooper in BeOS)
--
Sylvain Kerjean
IRISA-INRIA, Campus de Beaulieu, 35042 Rennes cedex, France
Tél: +33 (0) 2 99 84 75 99, Fax: +33 (0) 2 99 84 71 71
next reply other threads:[~2001-01-31 10:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-29 10:15 Sylvain Kerjean [this message]
2001-01-31 16:42 ` Brian Rogoff
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=3A7542CB.6731EBDC@irisa.fr \
--to=skerjean@irisa.fr \
--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