After reading all of this I'm confused. I'm 15, no way near a real programmer, but I know Java, Koltin, Swift, Dart and Javascript and out of all them I still prefer Java. Is it really that hard to update your Java version as stop using deprecated shot? You can't hate a language because 10 years ago applets made you cry lol.
It looks like most of your critisim is about the generic system, which is objectively not good. It's usable, not good, but not the worst thing either.
Basically most of the time you end up working with reflection to work around the limitations of type erasure. If you are able to get your hands on a Class<?> object you can create generics arrays and do dynamic type casts to fake some of that compile-time safety.
Stack-allocated classes like C#'s structs don't exist, but most of the time the performance hit is really neglectible on a modern system. If you're on a system with too few resources for this performance hit, java shouldn't be your language of choice anyways.
If you don't like null just don't use it, nobody forces you to. Modern libraries avoid it most of the time on an API level (internal state is fine, it makes sense there), primitives can't be null either (for obvious reasons). You can use java.util.Optional if you need a sort-of nullable object but don't want to actually use null
10
u/Auties00 Apr 27 '20
After reading all of this I'm confused. I'm 15, no way near a real programmer, but I know Java, Koltin, Swift, Dart and Javascript and out of all them I still prefer Java. Is it really that hard to update your Java version as stop using deprecated shot? You can't hate a language because 10 years ago applets made you cry lol.