caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Clemens Hintze <cle-ocaml@qiao.in-berlin.de>
To: Mark Wotton <mrak@cs.usyd.edu.au>
Cc: Clemens Hintze <cle-ocaml@qiao.in-berlin.de>, caml-list@inria.fr
Subject: Re: [Caml-list] Re: [Q]: Co(ntra)variance and subtyping?
Date: Sun, 18 Nov 2001 10:16:36 +0100	[thread overview]
Message-ID: <20011118101636.A38485@qiao.in-berlin.de> (raw)
In-Reply-To: <Pine.LNX.4.21.0111181004180.6020-100000@hons.cs.usyd.edu.au>

On Sun, Nov 18, 2001 at 10:17:51AM +1100, Mark Wotton wrote:

(...)

> This way, you can take "t list" and add either "t" or "t'" to the
> front. Therefore, "t list" can do anything that "t' list" can, and
> the intuitive notion of subtypes is preserved.

Ahh ... I have the slight feeling, that I slowley get it ... thank
you. But I have to ask some more qustions to be sure ...

- In the context you have mentioned above: 'invariant' means the two
  types have *no* relationship to each other, yes?
- If you believe that contravariance isn't generally particularly
  useful, as you stated in the mail before, why can I flag some type
  with (-'a) stating this is contravariant? What sense does this make?  
- What exactly are types and subtypes in OCaml? You know, I am coming
  mainly from the imperative world. There I use languages that makes
  no distinction between classes and types. Is 'int' a subtype of
  'float'? How can I decide if something is a subtype of another one?
  I do not ask in sense of OO inheritance but in OCaml terminology.
  
> Apologies for getting it wrong the first time. It's doubly
> embarrassing as it seems I made the same mistake in the thesis I
> just handed in...

Its ok for me that you get it wrong, because so I could detect the
flaw and ensure myself that I am of the way of understanding. But that
you probably had made same mistake in thesis is really unfortunate for
you, and I feel a pity therefore :-(


Thanks again and ciao,
Clemens.
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


  reply	other threads:[~2001-11-18  9:20 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-11-16 19:37 [Caml-list] " Clemens Hintze
2001-11-17 14:18 ` Mark Wotton
2001-11-17 14:55   ` Mark Wotton
2001-11-17 17:50   ` [Caml-list] " Clemens Hintze
2001-11-17 23:17     ` Mark Wotton
2001-11-18  9:16       ` Clemens Hintze [this message]
2001-11-18 13:18         ` Alain Frisch
2001-11-19  9:54           ` Remi VANICAT
     [not found]       ` <9t7v4d$gij$1@qrnik.zagroda>
2001-11-18 11:57         ` Marcin 'Qrczak' Kowalczyk
2001-11-18 13:34 ` [Caml-list] " Andreas Rossberg
2001-11-18 21:22   ` Pixel
2001-11-19  0:33     ` Jacques Garrigue
2001-11-18 22:35       ` David Gurr
2001-11-19  7:24         ` [Caml-list] " Clemens Hintze
2001-11-19 12:03           ` Markus Mottl
2001-11-19  8:29         ` [Caml-list] " Xavier Leroy
2001-11-19 11:03       ` Alain Frisch
2001-11-20  9:58         ` Didier Remy
2001-11-19 11:14       ` Pixel
2001-11-18 22:30   ` [Caml-list] Re: variance, subtyping and monads... oh, my! james woodyatt
2001-11-19  8:11     ` Francois Pottier
2001-11-19  9:02       ` james woodyatt
2001-11-19  9:58         ` Markus Mottl
2001-11-19 20:47           ` james woodyatt
2001-11-19 12:56       ` Frank Atanassow
2001-11-19 10:39     ` Andreas Rossberg
2001-11-19 12:21       ` Markus Mottl
2001-11-19 13:43         ` [Caml-list] Kylix and OCaml Christophe Raffalli
2001-11-20  2:05           ` Vitaly Lugovsky
2001-11-20  8:51             ` Christophe Raffalli
2001-11-22  1:42               ` Vitaly Lugovsky
2001-11-20 10:00             ` Benjamin Monate
2001-11-20 10:24               ` [Caml-list] [Bug in an interface between C++ and OCAML due to some pointer encapsulation] Sylvain Kerjean
2001-11-20 12:14             ` [Caml-list] Kylix and OCaml Maxence Guesdon

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=20011118101636.A38485@qiao.in-berlin.de \
    --to=cle-ocaml@qiao.in-berlin.de \
    --cc=caml-list@inria.fr \
    --cc=mrak@cs.usyd.edu.au \
    /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).