From: Keiko Nakata <keiko@kurims.kyoto-u.ac.jp>
To: oliver@first.in-berlin.de
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Feature wish: to omit explicit coercion for mli's
Date: Mon, 21 Nov 2005 21:55:18 +0900 (JST) [thread overview]
Message-ID: <20051121.215518.68549734.keiko@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <20051121094629.GC829@first.in-berlin.de>
From: Oliver Bandel <oliver@first.in-berlin.de>
> If *.ml and *.mli do not match, then you have written
> code that better would be rewritten, to say it nicely. ;-)
I do not think this is a bug-wish.
ob.ml would match with ob.mli by inserting explicit coercion as in :
in ob.ml:
let o = (object method f1 = 1 method f2 = 2 end :> < f1 : int >)
in ob.mli:
val o : < f1 : int >
I thought that this explicit coercion can be suppressed
with little inefficiency of the type checker.
I occasionally use immediate objects to build polymorphic objects
without writing type annotations.
(I mean, if I build polymorphic objects through class definitions,
I may need to define the classes with many type parameters.)
For the same reason, I thought that it would be nice
if I could omit explicit coercion in some cases
when it does not cause inefficiency a lot.
Regards,
Keiko
prev parent reply other threads:[~2005-11-21 12:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-21 9:35 Keiko Nakata
2005-11-21 9:46 ` [Caml-list] " Oliver Bandel
2005-11-21 12:55 ` Keiko Nakata [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=20051121.215518.68549734.keiko@kurims.kyoto-u.ac.jp \
--to=keiko@kurims.kyoto-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=oliver@first.in-berlin.de \
/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