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

Compactness of the Classical Groups

Derivative AT a Discontinuity

Just because 2 things are dual, doesn't mean they're just opposites

Boolean Algebra, Arithmetic POV

discontinuous linear functions

Continuous vs Bounded

Minimal Surfaces

November 2, 2023

NTK reparametrization

Kate from Vancouver, please email me