I’ve been reading Bruce Eckel’s Thinking In Java and in the chapter on generics, he briefly mentions the Nice programming language as something that handles parametrized types better than Java, but compiles into Java bytecode.
Does anyone have any experience with this? Generics make my head hurt, so the prospect of an alternative that interoperates with Java is appealing… but I sort of feel like it would be like trying to learn both French and Quebecois and getting yelled at if I get them mixed up in the wrong context. (no offense meant so please don’t ding me for not being PC) And whoever thought up the name ‘Nice’ should be shot, since it makes it impossible to search for any websites other than the sourceforge one.
I’d also suggest looking at Scala, a multi-paradigm (OO and functional) language that runs on the JVM. Martin Odersky, the ‘father of Scala’ was also a primary contributor to the implementation of generics in Java, including his work on the Pizza and GJ implementations.
The current type-erasure mechanism in Java does force one to understand some implementation details to make sense of restrictions, but it is fair to say that using full-blown generic support in any language is going to require a learning curve.
I found Java Generics and Collections to be a well-written introduction and guide to using generics in Java 5.