r/learnjava • • Nov 25 '20

why do people hate java so much?

why do people hate java? I personally really love java because of the OOP paradigm and it makes my codes cleaner. not to mention the portability. but i swear I see more than one tweet hating on java everyday, or saying java is dying. is java really dying?

I guess I have two questions; why do people hate on java and is there still a future for java?

120 Upvotes

88 comments sorted by

View all comments

188

u/desrtfx Nov 25 '20

As simple as:

“There are only two kinds of languages: the ones people complain about and the ones nobody uses.”

Bjarne Stroustrup

Every programming language has its haters. Java is no exception to that.

Some of the haters were not capable of learning Java, some haven't even tried, some got used to working with "more convenient" languages, and others just jump on the hate train.

Sorry for the following rude language, but it is best not to give a single fuck about the haters and to just ignore them. (In fact, quite a large number does not even know what they are talking about.)

Yes, Java has its flaws. Yet, it is the #1 enterprise programming language for exactly the reasons you mention.

Java is often considered a "boring" language - which is exactly what enterprise development needs. It is a rock solid language with a very mature, extremely huge ecosystem.

Java is not moving as fast as other, more modern, more hyped languages, which is due to the fact that Java tries to maintain as much backward compatibility as feasible and also because it has to remain rock stable. Since Java is used in absolutely mission critical programs where the smallest instability could cause huge losses, the Java maintainers decided to move slower.

Java is not flashy. It is just a silent, quite efficient work horse.

Zero reasons to actually hate Java.

46

u/DerekB52 Nov 25 '20

As someone who started programming with Java a little over 5 years ago, and still loves and primarily uses Java. There are a couple of reasons to hate Java, that I don't mind seeing.

I think my biggest issue with Java though, isn't about the language. It's about Oracle. Oracle just sucks.

Also, Kotlin. I still love Java. But, with Kotlin existing, I do prefer to use that, by a lot.

10

u/BoyRobot777 Nov 25 '20

It's about Oracle. Oracle just sucks.

What did Oracle do? This is another "love to hate without reason". Because from what I've gather Oracle brought good changes to Java.

Sun acquisition by Oracle was completed on January 27, 2010. So in reality Oracle started maintaining only from Java 8. And immediatily we got long awaited features like lamdas and streams, which made code more funtional and less verbose.

Java 9 was all about preparing Java for faster releases by dividing huge monolith into logical, compile time modules. It was also time when they started to actually remove methods and weird dependencies like Java EE and CORBA Modules from Java SE. Next Oracle contributed pretty much all of the closed source technologies (or what was originally to become closed source) of the Oracle JDK to OpenJDK, for example giving the community: JDK Flight Recorder; JDK Mission Control; ZGC; …and probably more stuff I can’t think of right now. And finally ensured the Oracle JDK and the OpenJDK builds are virtually indistinguishable, except for licensing.

What's coming Java's is even more exciting:

  • Pattern matching is being shipped incrementally;

  • Records (aka data/case classes) address some parts of POJO boilerplate (the worst kind of boilerplate);

  • Project Loom will deliver big performance boost via Fibers and whats called multi-prompt delimited continuations. Java server will tremendously scale. Also this opens the gate for changing underlying JDBC connection implementation to become asyn without actually doing any change to the code. I think Java has this right vs C#/Kotlin where async brings its own method colour;

  • GraalVM is huge. Not only new JIT but AOT. Redhat new framework is building upon this. It leverages Graal to create native images. Those images are very small and optimized. For example one of Quarkus developers showcase the size of native image, spoilers - it's 19MB. It takes 0,004s to start. In this session, RedHat developer shows how Quarkus application is being scaled. Comparing to Node, it's both faster to respond to first request and have smaller memory footprint (half the size of node).

  • Values types (Valhalla) are being actively worked and they finally found a way to move forward.

6

u/DerekB52 Nov 25 '20

I didn't say Oracle ruined Java. I said Oracle sucks. Because Oracle sucks. Look at their court challenge against google. Honestly, I view Oracle as a patent troll trying to set some bad precedents.

2

u/BoyRobot777 Nov 25 '20 edited Nov 25 '20

That's it? This is why Oracle sucks? I have few quotes saved up for this "argument". First:

A quick summary, for people who never quite followed the saga:

Java (or at least the relevant portions) was licensed under the GPL.

Google took virtually all of the standard library surface (tens of thousands of lines of code), and wrote their own backing implementations.

Google chose NOT to release this derived work under the GPL.

If this were literally any party on earth OTHER than Oracle, then all of the Stallman people would be up in arms about this GPL violation. Making comparisons to the "Tivo-ization" that produced GPL3, etc.

But because it was Oracle, everyone jumped onto rationalizations for why it must not have violated the GPL. And the logic is pretty goddamned tortured. If someone did the same thing to <popular-project>, maintained by <popular-entity>, then the same people would probably rationalize the opposite view.

Everything is so crazy now. The Internet has made us so tribal and dumb, and objective reality doesn't matter anymore. It's scary.

Also,

During the trial, Schwartz said that at that time of Android's release, despite knowing Google may have bypassed their licensing requirements, "we decided to grit our teeth and support it so anyone supporting it would see us as part of the value chain".

You can read wiki and this.

So Oracle doesn't allow to be f*** by Google, which makes them the bad guy and somehow Google is a victim? Please... Save me the bullshit.

Edit. Lastly, I believe in judicially system. And I trust court will decide correcly. However, if you think reading some random comments on reddit makes you understand the case better, then godspeed to you.

1

u/firerunswyld Dec 06 '20

A swing and a miss.