[Haskell-cafe] Very silly

Tommy M. McGuire mcguire at crsr.net
Wed Oct 15 16:23:28 EDT 2008


Jason Dagit wrote:
> On Mon, Oct 13, 2008 at 8:32 PM, Tommy M. McGuire <mcguire at crsr.net 
> <mailto:mcguire at crsr.net>> wrote:
>     Java (and presumably C#) "generics" are very much like a weakened
>     version of normal parametric polymorphism.
> 
> I'm curious, in what way are they weakened?

That's a good question. :-)

I picked up the idea while reading Java Generics and Collections, but I 
can no longer find the part that *gave* me the impression.  I suspect 
that it is due to the type erasure vs. array runtime typing issues.

It may be the case that basic generics are identical to plain parametric 
polymorphism, and that the wildcard expressions attempt to serve the 
same purpose (with considerable divergence) as type classes and 
existential types.  But I don't know since my brains have apparently 
turned to oatmeal.

-- 
Tommy M. McGuire
mcguire at crsr.net


More information about the Haskell-Cafe mailing list