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

Transverse versus parallel crossings

Opera night in the tenderloin

Did you ever love her?

what's the ideal analogy

officer grade pemmican

Sammy Cottrell

Jump or die, dumbass

beats you

kairos

Mechanistic Interpretability and Lean 4