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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-03-04 (21:20)
From: Andreas Rossberg <rossberg@m...>
Subject: Re: [Caml-list] stl?
On Mar 4, 2009, at 21.49 h, Yoann Padioleau wrote:
> But haven't they added generics in Java because Java programmers
> wanted some of the capabilities of C++ templates ? They even
> use its syntax, and recent Java has added some ugly extensions
> with some star-stuff around it that I don't understand. So I think
> Java generics are closer to C++ templates than ML parametric  
> polymorphism
> and its inference.

Java Generics were originally designed by Wadler & Odersky, both of  
which came from functional programming.

> And Java has decided to not follow C++ on many things, they also
> don't have overloading, they have a GC, etc. It's just not the
> same target.

Java has overloading.

> I think at least Stroustrup mentions in its "the design and
> evolution of C++" book some comparisons with ML.
> But probably at that time ML didn't
> have yet the functor stuff, just the parametric polymorphism.

ML modules, including functors, where invented around 83/84 (by  
MacQueen), more than half a decade before macros evolved into  
templates, and a decade before D&E was published. Interestingly,  
Stroustrup even had his office down the hall from MacQueen at AT&T at  
that time. So he knew _about_ ML, but that's probably as far as it goes.

- Andreas