From: Michael Wohlwend <micha-1@fantasymail.de>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] oo type question
Date: Mon, 10 Mar 2008 09:38:17 +0100 [thread overview]
Message-ID: <200803100938.17756.micha-1@fantasymail.de> (raw)
In-Reply-To: <20080310.172043.180101905.garrigue@math.nagoya-u.ac.jp>
Am Montag, 10. März 2008 09:20:43 schrieb Jacques Garrigue:
ok, thanks for the explanations,
> From: Michael Wohlwend <micha-1@fantasymail.de>
>
> A small remark yet: in interfaces (and class types) it is ok to write
> class c : object
> method add : #someClass -> ...
> end
> Here it is automatically assumed that the type variable is bound at
> the method level.
ah o.k, nice to know. I'll try that.
(I thought declaring something to be of type #class is similar to
the "implenents" declaration in java, where you can pass objects without a
cast to methods accepting arguments of that interface, which I find
nice :-) )
I like the oncept of ocaml to make no implizit casts; only when using objects
I think casting to an upper class (!) should be done automatically since it's
one of the basic "features" of oo programming.
Michael
prev parent reply other threads:[~2008-03-10 8:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-06 12:52 Michael Wohlwend
2008-03-06 13:18 ` [Caml-list] " Peng Zang
2008-03-06 15:45 ` Michael Wohlwend
2008-03-06 16:58 ` Peng Zang
2008-03-10 8:20 ` Jacques Garrigue
2008-03-10 8:38 ` Michael Wohlwend [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=200803100938.17756.micha-1@fantasymail.de \
--to=micha-1@fantasymail.de \
--cc=caml-list@yquem.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