From: Oleg <oleg_inconnu@myrealbox.com>
To: Xavier Leroy <xavier.leroy@inria.fr>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Five Questions about Objects
Date: Tue, 16 Jul 2002 00:49:04 -0400 [thread overview]
Message-ID: <200207160448.AAA02784@dewberry.cc.columbia.edu> (raw)
In-Reply-To: <20020714174734.E28103@pauillac.inria.fr>
On Sunday 14 July 2002 11:47 am, Xavier Leroy wrote:
> > 4) Can I construct an object that the following function f would accept?
> > # let f a = a#m1 (); a#b#m2 ();;
> > val f : < b : < m2 : unit -> 'a; .. >; m1 : unit -> 'b; .. > -> 'a =
> > <fun>
[...]
> As for your example, just read the type of f aloud: the argument to f
> should be an object having at least an "m1" method and a "b" method;
> "b" should return an object having at least an "m2" method.
To me, " b : < m2 : unit -> 'a; ...>" seems to mean the following: "b" IS an
object having at least "m2" method of type "unit -> 'a". Just like m1 is
"m1 : unit -> 'b" above, not "m1 : 'b".
Had the toplevel said
val f : < b : unit -> < m2 : unit -> 'a; .. >; m1 : unit -> 'b; .. > -> 'a
It would have meant the same thing to me as it does to you in its present
reading.
Regards,
Oleg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
prev parent reply other threads:[~2002-07-16 4:48 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-13 13:42 Oleg
2002-07-14 0:58 ` YAMAGATA yoriyuki
2002-07-14 2:41 ` Brian Smith
2002-07-20 15:46 ` YAMAGATA yoriyuki
2002-07-14 8:58 ` Alain Frisch
2002-07-14 9:38 ` Jacques Garrigue
2002-07-14 10:23 ` William Lovas
2002-07-14 3:26 ` Jacques Garrigue
2002-07-14 15:47 ` Xavier Leroy
2002-07-16 4:48 ` Oleg
2002-07-16 4:49 ` Oleg [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=200207160448.AAA02784@dewberry.cc.columbia.edu \
--to=oleg_inconnu@myrealbox.com \
--cc=caml-list@inria.fr \
--cc=xavier.leroy@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