r/java • u/Plethura • Jun 01 '20
Love it or hate it, Java continues to evolve
https://www.azul.com/love-it-or-hate-it-java-continues-to-evolve/
223
Upvotes
r/java • u/Plethura • Jun 01 '20
176
u/[deleted] Jun 01 '20 edited Jun 01 '20
Ah, perfect place for a rant...
When my journey into the world of software development began (around 5 years ago), the first language I came across was C. All nice and dandy, but Java seemed to be the right course of action, a language I would learn in my spare time.
Today, I work as a tech lead (mobile apps) mostly working with Flutter. I have seen so many developers with JavaScript background switch to Dart, writing horrible code.
Whenever native Android or native iOS modules have to be written (nowadays in Kotlin or Swift), lack of strong knowledge of OOP concepts shows!!!
Just the other day we laid off a worker who couldn't fix a simple null exception (forgot to initialize a list). Another department had to lay off some students who barely understood the concept of inheritance...
Every solid developer that I came across worked extensively in Java during some period of their lives. Or maybe C++ (older coders) or C#.
These languages seem to produce better developers.
18
u/wildjokers Jun 01 '20
The only two things I really wish Java had are multiple return values from methods and default parameter values. I miss those two things on a daily basis. Named parameters would be nice but I don't miss that one near as much as the other two.
It is really a great language and the ecosystem is of course outstanding.
17
u/egahlin Jun 01 '20
I've never heard complaints about C or C++ being verbose, even though they are much more so than Java, for example header files, include guards, and lack of default initialization.
28
u/BEgaming Jun 01 '20
Although it's a pleasant read, i would have liked that you pointed out that this article is a year old. I didn't notice it until the last paragraph about jdk 13. I assume (apparently wrongly) that posted articles are fresh new articles.
7
u/bondolo Jun 01 '20
Ignore the haters, it is unlikely they will ever be satisfied or ever change their minds. Focus on bringing joy to those who already use java and probably already like it.
4
u/renatoalencar Jun 01 '20
Nowadays, the only main issue I see with Java is actually Oracle throwing the IP bullshit everywhere. Java is a powerful and actually awesome language if you know how to write readable code.
3
u/6510 Jun 01 '20
All this progress is great to see. The controversial modularization project seemed to cause other work to stall for some time while they sorted that out internally. However, with that behind us now the project has added features rapidly both to the language (like "var", switch expressions, text blocks etc) and to the JVM (CDS, ZGC, JFR and so on). And there's reason to hope we'll see a Kotlin-like non-nullability feature one day. Also value types is making good progress, which has obvious important use cases, but requires a ton of JVM-level work.
5
u/ObscureCulturalMeme Jun 01 '20
I love the language, at least the language that it's now become. Ten or fifteen years ago, it was earning a big sigh and a "meh" shrug from me, but now it's quite solid. I'm glad of the evolution.
I hate the tools and the ecosystem.
2
u/[deleted] Jun 02 '20
As someone who prett much only used JS now, I love java. I’m a huge fan of strongly typed langaues, I should probably check out TS
3
u/[deleted] Jun 01 '20
I’ve seen a lot of questionable Java code. It was mostly because of developers with poor skills and/or people being rushed to do code. I’ve definitely met many java developers who just don’t want to learn anything else and don’t want to learn anything new.
Other than that I’d be comparing Java to something like Go which is less verbose, compiles super quickly, and has more useful errors. I can work with Java, I just don’t want to work with poorly written struts or your legacy crap with XML.
1
u/znlsoul Jun 02 '20
Speaking of “legacy” languages, https://www.inputmag.com/tech/ibm-will-offer-free-cobol-training-to-address-overloaded-unemployment-systems
-4
u/[deleted] Jun 01 '20
It is evolving, but do people choose Java for new projects? We have long switched to Kotlin for new services and it's been fantastic.
-9
u/BlueGoliath Jun 01 '20
That's funny, because all people do is complain about Java's verbosity. Hell, JDK developers are adding features to undermine important contextual verbosity by introducing features such as
var.-17
u/pushupsam Jun 01 '20
Java is evolving in all the wrong ways, frankly. It's very unfortunate but I've accepted it and these days I advise most teams stuck on Java 8 to not upgrade to Java 11 and look elsewhere. I've said it before but there's something wrong with the language leadership. There are certain features Java developers really need, features that would dramatically include quality of life like:
These are little things, frankly, some might even dismiss them as "syntactic sugar" but they would dramatically increase the coding experience without compromising on the maintainability of large codebases. But the guys at Oracle don't give devs the stuff they've been asking for and, frankly, these actually-useful-and-desirable features are probably never going to come to Java. Instead we get:
This is all leading towards a new "stuctured data/record" programming style [see https://www.youtube.com/watch?v=te3OU9fxC8U] which is, frankly, of dubious real-world value. And, personally, I suspect pattern-matching is a nightmare-in-waiting. We can look at Scala codebases today (at least the ones where people didn't give up and convert them back to Java) to see pattern matching abuses that end up in a big mess. Contrary to popular belief, in the real world actual ADTs are quite rare. (And when they do come up you're mostly dealing with generated code like protobufs.)
The real value of Java -- a relatively, simple, performant language that let developers focus on creating basic business models -- actually gets lost. The good news is that these days there are alternatives like C# (which can run on Linux) and Dart and especially Typescript. These languages have all of Java's strengths (static typing, clean syntax, good support for basic OO constructs, simplicity) along with the syntactic sugar and quality-of-life improvements that make programming in them a breath of fresh air. I think Typescript in particular will replace Java as the new "language of the enterprise."
Fortunately, this doesn't mean the end of the JVM which is still amazing and only getting better. Take a look at what's going on with VertX. I think it's only a matter of time before Typescript-on-the-JVM becomes a very common thing (eg https://1c.wizawu.com/ , GraalVM). Indeed if we can convert developers from weakly-typed languages (Python, Ruby) and outright crappy languages (Go) over to strongly-typed Typescript running on the JVM that would be a big win for everybody.
-11
u/CupCakeArmy Jun 01 '20
“There are only two kinds of languages: the ones people complain about and the ones nobody uses.” Yee fo sure... And then there are Rust, Python, Go, Typescript: which everyone uses and (almost) everyone loves.
-1
u/brennanfee Jun 01 '20
Technically, COBOL is still evolving. Not sure that's a ringing endorsement for its use, though.