Type Erasure is a Failed Experiment - Type Integrity
In part one, we introduced the topic of Type Erasure, looked at an imaginary conversation with C# and the same conversation with Java, and delved into some of the problems with Java Generics. If you haven’t read that, go back and read it before you read this post.
Type Erasure Is A Failed Experiment - Interface Segregation
Generics are amazing! There is something immensely satisfying about solving an entire class of similar problems, rather than just solving a single instance of a problem. Why figure out how to cache this one database call, when I could figure out how to cache an arbitrary number of varying database calls? Why merely solve authenticating one web request, when a solution to authenticating all web requests is within reach? The scope of engineering problems vary, but my tendency does not. I would rather solve something abstractly, than concretely. Creating simple, elegant, portable solutions to particular type of problems is immensely satisfying.
Collaborate With Your Computer
One of the core concepts in Object Thinking or Extreme Programming is the importance of metaphors. Metaphors are the way you conceptualize a given problem in your mind. The metaphors you use will profoundly influence your designs.
Build Horizontally, not Vertically
If you want a program that is fragile, rigid, and immobile, build vertically.