Re: Objective Label 2.04

From: Jacques Garrigue (
Date: Thu Dec 02 1999 - 10:36:49 MET

Subject: Re: Objective Label 2.04
In-Reply-To: Your message of "Tue, 30 Nov 1999 16:42:56 +0100 (MET)"
Message-Id: <>
Date: Thu, 02 Dec 1999 10:36:49 +0100
From: Jacques Garrigue <>

From: Juergen Pfitzenmaier <>

> 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

This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:29 MET