From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
To: henri.dubois-ferriere@epfl.ch
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] coercing to a #-type
Date: Fri, 05 Dec 2003 21:57:33 +0900 [thread overview]
Message-ID: <20031205215733B.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <Pine.LNX.4.44.0312051212490.24750-100000@lcmpc4.epfl.ch>
From: Henri Dubois-Ferriere <henridf@lcavsun1.epfl.ch>
> can coercing an object to a #-type ever change the type of the object?
>
> [i tried to come up with some instance where this would happen, but could
> not, and on thinking about it i would guess that since a #-type is 'open',
> it makes no sense to coerce to such a type.]
What do you mean by "coercing"?
If you mean (o :> #a), then indeed it is pointless, as it is just
equivalent to (o : #a) (no subtyping is introduced).
> A somewhat related question:
>
> class a = object method bla = 1 end
> are the types
>
> #a
>
> and
>
> < bla : int; ..>
>
> equivalent? (in the sense that using on instead of the other will
> always give identical results)
Indeed they are equivalent. #a is just a convenience to make printed
types more readable.
Jacques Garrigue
-------------------
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:[~2003-12-05 12:56 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-12-05 11:34 Henri Dubois-Ferriere
2003-12-05 12:57 ` Jacques Garrigue [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=20031205215733B.garrigue@kurims.kyoto-u.ac.jp \
--to=garrigue@kurims.kyoto-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=henri.dubois-ferriere@epfl.ch \
/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;
as well as URLs for NNTP newsgroup(s).