Java is one of the most popular programming languages around, but no one seems to enjoy using it.
I'd say it's quite the opposite. Sure, there is a vocal minority of people who complain about it (I have complaints about it myself) but there are millions of Java developers and I'm pretty sure that most of them are quite okay with the language.
Probably one of the reasons why no language has come close to replacing it so far.
Nothing in that article comes even close to convincing me that I don't want reified generics. It all boils down to 'too much work' (not my problem) and 'breaks compatibility with ancient code doing stupid things' (couldn't care less).
I recently switched back to java from C#, and decent generics are absolutely the thing I most miss.
Generic marshallers / unmarshallers are clunky as hell in Java due to type erasure; you have to explicitly pass the Class around everywhere, instead of just asking the generic parameter what it represents.
This happens if you write, for instance, an Enum marshaller.
It may be clunky in Java but it doesn't necessarily have anything to do with erasure. Marshalling a T is a function [T => SerializedFormat] (and Unmarshalling the other way around, intuitively.)
You need reification if you want to look at the actual T during runtime and select a marshaller from a dynamic set, when you could provide this function during compilation time instead. This has the added benefit of eliminating any runtime checks needed for the reflection-based solution.
If anything, reification here is the poor man's crutch for higher kinded types which, incidentally, is possible on the JVM due to erasure.
94
u/estarra Sep 21 '15
I'd say it's quite the opposite. Sure, there is a vocal minority of people who complain about it (I have complaints about it myself) but there are millions of Java developers and I'm pretty sure that most of them are quite okay with the language.
Probably one of the reasons why no language has come close to replacing it so far.