Generic types in Java.
This report discusses the lack of generic types in the programming language Java, which is nice to have when writing fast, generic methods that can be used in different contexts. It is possible to type generic variables with the class "Object" instead of using generic types, but this causes the compiler to insert a lot of run-time tests that slows down the execution speed.
Different languages includes different philosophies of how to solve the generic types. This report takes a look at generic parameters in methods, which works much in the same way as templates in C++, and it also discusses some thoughts around generic packages, which originally was a suggestion for the Simula language.
To test out these new enlargements of Java, I have tried to implement some design patterns and a bigger example where I combine these.