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: [Caml-list] A G'Caml question" + additional info
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-07-11 (22:47)
From: Brian Rogoff <bpr@b...>
Subject: Re: [Caml-list] A G'Caml question" + additional info
On Wed, 11 Jul 2001, Krishnaswami, Neel wrote:
> Markus Mottl [mailto:markus@mail4.ai.univie.ac.at] writes:
> > On Wed, 11 Jul 2001, Bruce Hoult wrote:
> > > But the language itself seems to be starting to rival C++ for sheer
> > > complexity. When you want to do something you seem to have a choice
> > > of using this feature, or *this* one, or *this* newly developed one.
> > 
> > Having choices is not necessarily bad, being forced to using many
> > alternatives is. I think that OCaml has succeeded quite well so far in
> > keeping different features apart as one can see in the standard library,
> > which can be used with the core language + modules alone. I hope this
> > will stay so!
> Permit me to disagree. I find nearly all of OCaml's features highly
> useful and orthogonal, and I am only working on medium size projects. 

Good point, I was going to disagree with Bruce on the C++ comparison. 
OCaml is still orthogonal, with the major exception being the overlap
between the object system and the module system. I guess that's still

> For instance, I recently wrote yet another set implementation, because 
> the functorial interface to the Set module in the standard library 
> wouldn't let me use it in a fully polymorphic fashion. If the Set 
> library had been written using OCaml's object system, then I would 
> not have had to redo my own. From this experience I conclude that the 
> right thing is to use the features that offer the nicest degree of
> modularity and reusability.

That's odd. If the Set library had been implemented using the object
system, it seems that you would have less (parametric) polymorphism 
since OCaml doesn't (yet?) have polymorphic methods. 

But, I agree that there should be polymorphic versions of some of the 
functorial libraries. There is no way to directly have a recursive 
type definition/functor instantiation, so if you want to implement what 
OOers call the Component pattern you have to use the parameterization 
trick which requires a polymorphic functor. This has bit me a few times
already. This is pretty high on my "I sure hope this gets fixed one day" 

BTW, if you really like OO style libraries, point your browser this-a-way 


-- Brian

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