Quote on Java Generics


From some guy on Hacker News:

…to add insult to injury, its static type system is very weak. A combination of type erasure, a failure to unify arrays with generic types, and poor type checking in the reflection system means that Java’s static typing doesn’t give you particularly much help with writing well-factored code compared to most other modern high-level languages. Speaking of generics, the compiler’s handling of generics often leaves me feeling like I’m talking to the police station receptionist from Twin Peaks. Every time I have to explicitly pass “Foo.class” as an explicit argument when the compiler should already have all the information it needs to know what type of result I expect, I cry a little inside. Long story short, if I could name a type system to be the poster child for useless bureaucratic work for the sake of work, it would be Java’s.

Related Posts

List of places where the US has been involved in regime change, with multiplicity

Accuracy vs Precision

Handy command line benchmarking tool

Stan Rogers

Ultimate Hot Couch Guy

The Programmer Tendency

Figure out undocumented JSON with gron

Mental Model of Dental Hygiene

Book Review: Swastika Night

Is there a name for this construction?