Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] [Q]: Co(ntra)variance and subtyping?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Alain Frisch <frisch@c...>
Subject: Re: [Caml-list] [Q]: Co(ntra)variance and subtyping?
On Mon, 19 Nov 2001, Jacques Garrigue wrote:

> In the ML world, we mean complete type inference.

What does complete type inference mean ?  I would say that it implies
that no type annotation is mandatory (if a program typechecks with a type
annotation, it should also typecheck without). This property does not hold
in OCaml; you can't remove type annotation in:

class o = object method f (x : int) = x end

or in the toplevel structure:

let f () : [`A] = `A
let x = f ()


-- 
  Alain

-------------------
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