In this article, we’ll debunk the notion that Java is a relic of the past and showcase the language’s modern features, thriving ecosystem, and unwavering presence in enterprise and open-source communities.
As a software engineer, from experience: yes and no.
The language itself is getting a lot of cool, new, modern features. However, I’ve never had a job where we were using the latest Java version. The most up-to-date JDK I’ve used in work was two major releases back, and most of the time it’s older than that.
sizeoftheuniverse@programming.dev 11 months ago
Yes it does, the only parts where Java doesn’t shine are usually some advanced features that are nightmarish for people who are building tools and libraries:
The type system is so 90s and it’s kept like that for backwards compatibility
Generics having type erasure is again an improvisation for the sake of backwards compatibility. It makes writing generic code in conjunction with Reflection painful.
The lack of control for the memory layout. I mean in most cases you dont need full control, but there are use cases where it’s literally impossible to do optimisations that are easy to do in C/C++. You must have faith in the JVM and JIT.
Integration with native code is cumbersome.
moonleay@feddit.de 11 months ago
This is why I love Kotlin so much. You can use the Java ecosystem with a modern language.
thtroyer@programming.dev 11 months ago
Project Panama is aimed at improving the integration with native code. Not sure when it will be “done”, but changes are coming.
darkfiremp3@beehaw.org 11 months ago
There is also a big enterprise group who write extra verbose legacy java, vs a more modern light way to write
sizeoftheuniverse@programming.dev 11 months ago
Yes, i was part of the cult in my early days as programmer. I would endlessly create abstractions over abstractions. But the whole madness started for valid reasons.
Im the early days of Java on the web, you had servlets and JSP. Servlets were miserable to write, and JSPs were basically PHP with Java. Those were the days before JSON and yaml, when XML was king.
So people wanted to abstract their way out of JSP and XML, so they created layers to isolate the nasty parts and make it easier to write actual Java code. So a few ideas emerged/frameworks, some ideas emerged: ORM, EJBs, Struts, JSF, template frameworks, and finally Spring which was the lightweight one, if you can believe it. People experienced with various patterns and frameworks. Eventually Spring won, and then Spring started to use annotations, JSON became more popular, etc., the code became less and less verbose.
Some Java developers never made the mental jump and are still creating huge piles of abstractions because this is what they’ve learned from their seniors.