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

Sensing and Intuition

What Does Big Mean?

Astrology for Men

a perfectable programming language

An interactive Lean 4 blog post — click through for the full experience.

MBTI and AI

Double Date

Worse Than a Sranc

thanks whole foods lady

Another way of doing big O notation

Compactness of the Classical Groups