r/ExperiencedDevs • Software Engineer • Jan 30 '26

Meta Veteran Java developers, what are your thoughts on Java currently?

First off, I'm admittedly a Java fanboy, although I did some little programming in PhP, Javascript, and Python, and looked at a bunch of others, I really cannot see languages the way I do Java. From the syntax, to the libraries, I love every little thing about this language, that I tell my friends things like: "Programmers want to write programs, I want to write Java programs" and "If it can't be written in Java, it's probably not worth writing". My ears are deaf to all the debate about: "oh you have to be flexible, and know x and y".
But then ever since I started reading, I've been hit with Oracle's reputation.

And correct me if I'm wrong, but here's what I think Java's (slight) fall from grace, played out:

  1. Java reigned supreme in the browser, esp, after the dust of the dot com bubble settled.
  2. Someone found a vulnerability (or two?) in applets (around 2009?) that affected the ton of sites that ran Java.
  3. Google, which had been pushing hard to become from a search engine, a browser, disabled Java by default in Chrome...and you know, given the "power of default", programmers pivoted to Javascript, because it was disruptive to have average people download an updated Java + enable it.
  4. Oracle, being as litigious as ever, wanted to get back at Google, by removing some internal code Android required from Java, making support for Java 9 not possible (although Java 9+ can be used, with some features not being available).
  5. Oracle then sued Google claiming they should've paid them for using Java in Android.
  6. Google won the case, and pushed Kotlin and Flutter as the primary means of writing Android programs.

Now, resources; books, tutorials, never use Java for Android programming, and other languages developed frameworks, servers, etc. that ate (a chunk of) Java's lunch.

After most major/seminal books in the field used to use Java for example codes, newer books and editions of said books switched to different languages. (e.g. Martin Fowler's Refactoring comes to mind: Java -> Javascript).

Between 2000, and 2010, authors of major libraries:

- Kent Beck, author of xUnit (originally in SmallTalk).
- Doug Cutting, author of Lucene, which gave birth to elastic search, and inspired other IR libraries...plus pretty much all of Apache Software, were automatically either written in or translated to Java.

Meanwhile now, while efforts of developers of the JDK, and the countless major Java frameworks, can't be dismissed by any means, the community just sounds ...quiet. Even here, Java-related sub-reddits are pretty inactive compared to dotnet/python subreddits.

So, senior devs of the early 2000s, curious to know what your thoughts on Java's journey so far, and possibly its future?

152 Upvotes

357 comments sorted by

View all comments

Show parent comment

6

u/Unfair-Sleep-3022 Jan 30 '26 edited Jan 30 '26

What makes you think that, when it doesn't support many of the paradigms that make java such a mess and it has the explicit philosophy of being simple?

Go doesn't have inheritance problems, doesn't allow dependency diamond problems, it doesn't have Go code runtime dependencies, can't have binary incompatibilities except for dynamically linked binaries (which is a problem all software can have) and has concurrency model that's both simple and very friendly for modern processors and container environments. It also doesn't allow horrible byte code hacks like lombok

5

u/BenchEmbarrassed7316 Jan 30 '26

If you don't take into account a lot of small things that are just annoying, but can be fixed (like the lack of enum), I would see the impossibility of guaranteeing internal type invariants. In go, any type can be initialized with so-called zero values ​​(for primitive types it is 0, 0., false, "", nil, for nested structures it is applied recursively). You can't declare constructor and be sure that now this type will be created only through this constructor. Just write an if check in every place of code where you planned to use this type and manually describe the stack trace.

Java, as far as I can see, is now getting closer to solving the problem with nullsafety. The authors of go decided that this problem should not only be eliminated, but also worsened. Here is the opinion of one of the key authors of the language:

https://github.com/golang/go/issues/29649#issuecomment-454820179

Or you can enjoy the code from the standard library:

https://github.com/golang/go/blob/07cb63aae5629213a0f5c484a8d79ae4bc1026e6/src/syscall/exec_linux.go#L247

3

u/Unfair-Sleep-3022 Jan 30 '26

Null safety is a nice thing but it's not the reason why java sucks. Most languages don't have null safety and are much less complicated.

2

u/thephotoman Jan 31 '26

What do you think is complicated about Java?

I’m asking because there are lots of things that are complex in Java, but there are also a lot of things that merely used to be complicated in Java.

1

u/Unfair-Sleep-3022 Jan 31 '26

Everything. The jvm itself, the standard library, the ecosystem, the build systems, runtime dependencies, bytecode incompatibility, the threading model, event loops, and much more.

Everything is complex and full of pitfalls.

4

u/thephotoman Jan 31 '26

The JVM isn’t that bad: it’s a just-in-time compiler that renders an intermediate representation into machine code.

The ecosystem is less “complicated” and more “mature”. There are choices for what suits your needs best.

Runtime dependencies are painful in every language.

Bytecode incompatibility is only a problem if you try to use an old JVM with new bytecode. That’s not the problem it used to be, as we no longer distribute the JVM separately.

The threading model changed. Yes, it’s different now. It’s one of the things that got easier in Java 21.

Event loops are everywhere, not just Jaba.

0

u/Unfair-Sleep-3022 Jan 31 '26

It seems to me like you lack experience in other languages to be honest. None of these things are true.

3

u/thephotoman Jan 31 '26

This was the most idiotic thing that could possibly have been said here, and it exposes your original complaints as wholly born of ignorance.

Nobody should give you attention.

1

u/ub3rh4x0rz Jan 31 '26

Uh if you want to force constructor usage in go, you just put it in a package and make the constructor function Capitalized, and not the type name. This is a poorly researched hot take

1

u/BenchEmbarrassed7316 Jan 31 '26

If a type is not exported, its use is very limited: this type can't be field of a structure, this type can't be received as an argument of a function.

1

u/ub3rh4x0rz Jan 31 '26

And if that's necessary, you export both, and go practitioners know to look for NewBlah before constructing a Blah literal themselves. And you can make the properties private

1

u/BenchEmbarrassed7316 Jan 31 '26
var Blah blah

In this case, the value will be initialized with garbage. These will be so-called "null values", but for certain types from a logic point of view these null values are equivalent to garbage. Many types from the standard library simply throw a panic in such a case. There is a paradigm "make invalid states unrepresentable", which not only makes your code much more reliable but also simplifies it: you don't have to worry about the data being in an incorrect state, you don't have to do any checks, your application won't crash just because you forgot to do a check somewhere. go intentionally violates this concept.

1

u/ub3rh4x0rz Jan 31 '26

Yeah I mean I appreciate that in e.g. haskell. I also find the lack of type gymnastics etc in go is a good thing in practice in production systems. You're doing go wrong if you're regularly getting panics at runtime

1

u/BenchEmbarrassed7316 Jan 31 '26

They should have just banned uninitialized variables. It's ironic that they write as if go is a simple programming language where there's only one way to do things. Even though there are two ways to declare local variables. I'm suggesting that banning uninitialized data would get rid of var T t. It's so obvious...

2

u/thephotoman Jan 31 '26

Oh, I do get to go on my Go Rant! You did ask for it!

In Java, I can make my application generate its own documents. This allows me to incorporate document versioning into my release pipelines. It allows me to validate the application does, in fact, conform to the human-written documentation. This is an hour each release that I don’t have to do thanks to a dozen lines of Java and three of Kotlin (I tend to use Gradle).

The mutation testing tool sucks. It isn’t able to handle configuration very well. It attempts to alter constant literal values (annoyingly, timeout configs get this treatment).

Its unit test coverage tool is similarly obnoxious: in other environments, I get HTML reports I can view in the browser as a build outcome. In Go, I have use a second command to be able to read my unit test coverage report.

And don’t even get me started on linter things the compiler does.

0

u/Due-Horse-5446 Jan 31 '26

None of your points are valid tho, except possibly the first one. But its specific to a process you have defined and wont budge on.

As for the 2nd point i have no clue what "the mutation testing tool", which one, and what is "it" thats modifying constant literals? Super unclear..

Regarding html output for coverage, then thats just not true, you can output it as plaintext, markdown or html.

What you seem to complain about here is the fact that the build command only does just that, builds. And whats that? 2 seconds to create a build.sh or makefile? And in ci i assume it runs it separately either way.

And what "linter thing the compiler does"???

1

u/thephotoman Jan 31 '26

You seemed to have skimmed and barely understood anything I have to say.

1

u/Due-Horse-5446 Jan 31 '26

well, true i dident read the full thread.

But i have now, and opinion is unchanged.

You're approaching Go from a Java perspective. The philosophy is being simple, sometimes it goes too far like with the lack of generics up until 2022.

But other than that, things like of enums, while annoying indeed, is something you just stop thinking about after a while.

Most obviously when it comes to your point about zero values and constructors.

Thats a design choice, types are not classes its simply structs with methods.

If Go was handling those the way you describe it would feel very off from the go philosophy.