From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id KAA12565; Sun, 18 Nov 2001 10:20:06 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id KAA12943 for ; Sun, 18 Nov 2001 10:20:04 +0100 (MET) Received: from gnu.in-berlin.de (gnu.in-berlin.de [192.109.42.4]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id fAI9K3927541 for ; Sun, 18 Nov 2001 10:20:03 +0100 (MET) Received: from hirsch.in-berlin.de (root@hirsch.colt.in-berlin.de [213.61.118.6]) by gnu.in-berlin.de (8.10.1/8.10.1) with ESMTP id fAI9K3h13042 for ; Sun, 18 Nov 2001 10:20:03 +0100 (CET) (envelope-from cle@qiao.in-berlin.de) X-Envelope-From: cle@qiao.in-berlin.de X-Envelope-To: Received: from hirsch.in-berlin.de (uucp@localhost [127.0.0.1]) by hirsch.in-berlin.de (8.12.1/8.12.1/Debian -2) with ESMTP id fAI9K2Z6030746 for ; Sun, 18 Nov 2001 10:20:02 +0100 Received: (from uucp@localhost) by hirsch.in-berlin.de (8.12.1/8.12.1/Debian -2) with UUCP id fAI9K23S030745 for caml-list@inria.fr; Sun, 18 Nov 2001 10:20:02 +0100 Received: (qmail 38502 invoked by uid 500); 18 Nov 2001 09:16:36 -0000 Date: Sun, 18 Nov 2001 10:16:36 +0100 From: Clemens Hintze To: Mark Wotton Cc: Clemens Hintze , caml-list@inria.fr Subject: Re: [Caml-list] Re: [Q]: Co(ntra)variance and subtyping? Message-ID: <20011118101636.A38485@qiao.in-berlin.de> References: <20011117185051.A7607@qiao.in-berlin.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.3.19i Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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