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
Re: Objective Label 2.04
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 1999-12-02 (10:23)
From: Jacques Garrigue <Jacques.Garrigue@i...>
Subject: Re: Objective Label 2.04
From: Juergen Pfitzenmaier <pfitzen@informatik.uni-tuebingen.de>

> Jacques Garrigue wrote:
> >    * are using polymorphic methods. For technical reasons, this
> >     feature will probably not be included soon in OCaml.
> Why ? Polymorphic methods are the best part of OLabl. It should'nt
> be too hard to move code from OLabl to the OCaml distribution ?

The reason is that there was a major efficiency problem in olabl
typechecking, due to these methods. It can also produce huge .cmi
files. As long as these problems are not solved, it seems difficult to
include them in the production ocaml compiler.

Also, my experience with using them is contrasted. It is certainly a
nice feature, but not so easy to use: you have to give explicitly the
type when creating a method, and you need to know the type of the
object when using it.
They are not strictly needed, in that you can almost always write a
non-polymorphic method and a polymorphic function which calls it.

For all these reasons, inclusion of polymorphic methods into the
standard ocaml compiler is postponed until a more sarisfactory
solution is found.

As an intermediate solution, I may write a patch adding polymorphic
methods to the new ocaml compiler, as an experimental feature.

By the way, I do not think that polymorphic methods are the _best_
part of olabl. As its name goes, I believe that really labels are the
nice part... But anybody may choose its pet feature.


Jacques Garrigue
Jacques Garrigue, visiting INRIA from Kyoto University
		          Jacques.Garrigue at inria.fr