Browse thread
Polymorphic variant typing
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: | 2005-02-16 (01:21) |
From: | Gilles Dubochet <dubochet@u...> |
Subject: | Re: [Caml-list] Polymorphic variant typing |
Thanks: that was exactly what I was looking for. > The reason is simple enough: variants in ocaml are not based on Remy's > rows, but on a type system with kinded variables, more in Ohori's > style. > This is described in detail in "Simple type inference for structural > polymorphism", which you can find at > http://wwwfun.kurims.kyoto-u.ac.jp/~garrigue/papers/ > > The main reason for this choice is avoiding making rows explicit, > i.e. having a multi-sorted type algebra. Note also that ocaml object > types, while originally based on Remy's system, are hiding their > row-variables, and can be described in the same formalism. Just to make it crystal clear for me: You say that the "main reason for this choice is avoiding making rows explicit", does this mean that the O'Caml team feels that row-based type information is too complicated for an average user since you either steer away of hide it in an object model? > Pragmatic reasons for this choice are given in Section 3 of > "Typing deep pattern-matching in presence of polymorphic variants" > which you can find at the same place. Sincerely, Gilles Dubochet.