Ways to improve Java Generics and dont say get rid of wildcards and reification.
- by mP
Sometimes i like to write up template classes and use type parameters to make the abstract methods more type safe.
Template<X> {
abstract void doStuff( X ); // NOT public
}
While type safety is great etc, the problem remains that even though X is not visible to outside code, one must still include the type to avoid warnings. My solution in this case would be to make it possible to define a scope for type parameters (now they are always public).
Would other original features besides the obvious would you like.