Generic Types and Methods
- slide 21 : 21
Generic types and methods - Pros and Cons
What are the advantages and disadvantages of generic types?
Advantages
Readability and Documentation
More precise indication of types.
Less downcasting from class Object
Type Checking
Better and more precise typechecking
Efficiency
There is a potential for more efficient programs
Less casting - fewer boxings
Disadvantages
Complexity
Yet another abstraction and parametrization-level on top of the existing