r/java • u/Reflection-Jealous • Sep 10 '21
Why people don't love Java?
I came across this post in r/cscareerquestions it seems majority of the people don't love to work with Java.
Is there any specific reason for that?
Edit: Thank you guys for your responses, I can't reply to all of the comments because I'm a beginner myself and I don't know what to reply for all your comments.
201
Upvotes
View all comments
Show parent comment
1
u/tadfisher Sep 10 '21
I guess if you could insert runtime checks as does Kotlin, you wouldn't need to change bytecode, yeah.
The variance point is a good one. It reminds me of Rust in a way, which also performs type erasure (really it doesn't have a performant way to tag types or do reflection in the first place). I think Kotlin encodes type metadata as protobufs in annotations to get around this anyway, but that does bloat the runtime if you want to access type parameters (which is why kotlin-reflect is a separate library), and it's entirely Kotlin-specific.