[Haskell-cafe] Collections
Brent Yorgey
byorgey at gmail.com
Thu Jun 21 15:54:29 EDT 2007
> > public class Pair<A, B> {
> > public A fst;
> > public B snd;
> > public Pair(A fst, B snd) {
> > this.fst = fst;
> > this.snd = snd;
> > }
> > }
>
> OK, I don't even understand that syntax. Have they changed the Java
> language spec or something?
Yes. As of version 5 (or 1.5, or whatever you want to call it), Java has
parametric polymorphism. Do a Google search for "Java generics".
-Brent
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070621/1e32fc1b/attachment.htm
More information about the Haskell-Cafe
mailing list