Skip to content
Advertisement

Tag: generics

What are Reified Generics? How do they solve Type Erasure problems and why can’t they be added without major changes?

I’ve read Neal Gafter’s blog on the subject and am still unclear on a number of points. Why is it not possible to create implementations of the Collections API that preserve type information given the current state of Java, the JVM and existing collections API? Couldn’t these replace the existing implementations in a future version of Java in a way

Higher-kinded generics in Java

Suppose I have the following class: Now I want to introduce a generic argument, abstracting over the use of Expr: But Eclipse doesn’t like this: The type F is not generic; it cannot be parametrized with arguments <Fix<F>> Is this possible at all or have I overlooked something that causes this specific instance to break? Some background information: in Haskell

Advertisement