English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Compiler feature - useful or not?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-11-16 (14:17)
From: rossberg@p...
Subject: Re: [Caml-list] Compiler feature - useful or not?
"Alain Frisch" <alain@frisch.fr>:
> But the really interesting thing is that the new feature opens the door
> to extending the subtyping operator :> to take into account the natural
> (identity) injection from a private abbreviation to the underlying type.

Indeed. The first thing I was wondering when reading Pierre's description
was how that makes

  type t = private int

any different from a bounded abstraction

  type t <: int

With OCaml's explicit subtyping coercions, the former seems to be subsumed
by the latter.

- Andreas