From: Keiko Nakata <keiko@kurims.kyoto-u.ac.jp>
To: rich@annexia.org
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Why can't immediate objects be extended?
Date: Mon, 14 Jul 2008 23:38:06 +0900 (JST) [thread overview]
Message-ID: <20080714.233806.68558997.keiko@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <20080712141200.GA8634@annexia.org>
Hello.
> I'm wondering if there's a reason why one cannot inherit from
> immediate objects? (See description at:
> http://caml.inria.fr/pub/docs/manual-ocaml/manual005.html#ss:immediate-objects)
> Is it just a syntax problem because the 'inherit' keyword currently
> needs to take a class type, or is there a deeper reason?
I do not think it is a syntax problem.
Here is my understanding:
The type of a class and the type of an immediate object are essentially
different. In other words, the self type of a class is open, thus extensible;
the self type of an immediate object is closed, thus not extensible.
As written at:
http://caml.inria.fr/pub/docs/manual-ocaml/manual005.html#ss:immediate-objects)
the difference gives you different advantages; I suspect this is one reason.
Best regards,
Keiko
next prev parent reply other threads:[~2008-07-14 14:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-12 14:12 Richard Jones
2008-07-12 14:26 ` [Caml-list] " Richard Jones
2008-07-14 1:47 ` Peng Zang
2008-07-14 14:38 ` Keiko Nakata [this message]
2008-07-16 1:43 ` Jacques Garrigue
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=20080714.233806.68558997.keiko@kurims.kyoto-u.ac.jp \
--to=keiko@kurims.kyoto-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=rich@annexia.org \
/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