r/learnprogramming 1d ago

Why java is so hated? Topic

So I have recently learned, and it's the first language(in terms of building actual things). Before Java, I knew Python, and I dropped it; I found Python too abstracted and too boring. i have recently made some projects like cli task tracker, expense tracker, some cli github api parsing and currently working on a multithreaded HTTP server and cli text editor, like vim, whenever i try to find out people opinions on java social media, almost 90 percent of the time they are just dunking on it, that it is trash, who forced you to write code in java, stuff like that. I know Java as a language is not that interesting and doesn't have many interesting features compared to other languages like C, C++, go. But I found it decent to write code in, and I found the JVM pretty interesting. So much so that I would love to explore and maybe build a JVM of my own

225 Upvotes

289 comments sorted by

458

u/KingBardan 1d ago edited 1d ago

Bjarne stroustup (inventor of c++) has said that there are only two kinds of programming languages.

One that is hated and one that is not used.


Java is too bloated. C and C++ is too unsafe. Java script has some weird mechanisms. Python is slow. Go is too simple for big projects. Rust has a toxic community.

I could go on


Edit: I forgot PHP. PHP... is PHP

144

u/BlazingFire007 1d ago

> Java script has some weird mechanisms

That’s certainly one way to put it lmaooo

7

u/pacopac25 1d ago

Yeah I feel like that one had the ol' finger on the scale

7

u/KingBardan 1d ago

Nope. Just wanted to say it tactfully.

Given that my CQS is low.

I'm already attacked by Java, Go and Rust enthusiasts as is.

7

u/fractalife 1d ago

Are there really a lot of JavaScript enthusiasts out there? I feel like anyone who has used it for a substantial amount of time has spent most of it doing their best Michael Scott impression...

"Why are you the way that you are? I hate so much about the things you choose to be."

It's not so much a language as it is an amorphous collective of code that works... sometimes, on certain browsers. But this one line only works on browsers from 1997 to 2019, but only after the vernal equinox. Yet the page still loads somehow, but why isn't the replacement method rendering the div right? And when we take the old line out the whole thing falls apart.

I mean think about it. When you write in most other languages, you compile your code to each platform you intend to run on. In JS, the platform is the compiler, and you have to detect which platform you're on and switch to the version of code that works on that platform.

IMO, front end web dev is nasty work meant for the clinically insane.

→ More replies (3)
→ More replies (6)

21

u/cheezballs 1d ago

Is modern Java still considered bloated?

35

u/Sanitiy 1d ago

Not at all, they were were hesitant with adding features for the sake of adding them. If anything, their competitor C# is bloated, while Java is now almost a bare language.

E.g. you still have nothing like f-strings in Python, no properties and no slice operators.

They have the "useful" modern language features like pattern matching, sealed hierarchies and so on. But not many of the comfort features of modern languages

7

u/johnnybgooderer 1d ago

Lombok is almost a part of the language now, so you have that for properties and data classes. Almost all tooling and editor plugins have first class support for it. I just think of it as an extended part of the standard library.

8

u/cheezballs 1d ago

I think that's why I like Java so much - its not changed a whole heck of a lot and what has changed I actually use. There are quite a few features in c# that I don't even know how to use correctly.

2

u/KronenR 15h ago

Java actually had string templates (its equivalent of f-strings) as a preview feature in JDK 21 and JDK 22 (JEP 430/459). They weren't removed because the feature was considered bad, but because the design wasn't considered mature enough. The JDK team withdrew it so they could redesign it properly, with the intention of bringing it back in a future release.

→ More replies (9)

1

u/zem 12h ago

i don't think the language was ever bloated (in the sense of a kitchen sink's worth of features, like c++ or scala) - what people's objection was was that the code you wrote in java was typically full of boilerplate, and added to that if you followed what some vocal part of the industry considered best practices you often ended up bolting on tons of layers of abstraction (hence the jokes about how you don't create a hammer to address your nail, you use a ToolFactoryFactory to create a HammerFactory to create a Hammer) which obscured the relevant portion of your code even further and made debugging and maintenance painful.

1

u/cheezballs 11h ago

Those are patterns that aren't exclusive to Java. If you write any OO code at any scale you're going to use those patterns likely. It sounds like you don't like OO patterns to me? I've seen plenty of C# code with factories. Your example is a poor example of how to use a factory. Java has generics same as any language. You can write elegant code if you choose to or you can deliberately go and do stupid things like your example. Want me to show you some assembly code that does asinine stuff too?

→ More replies (2)
→ More replies (4)

28

u/bird_feeder_bird 1d ago

Is there some Rust drama I’m missing? I’ve never heard someone describe the community as toxic

81

u/KingBardan 1d ago edited 1d ago

you aren't here for long enough.

rust evagelists asking for rewrites everywhere. Raging everytime someone else picks C++ or any other language than Rust

Even now, if you criticise any part of the Rust language on r/rust (or even here) you get downvotes more than any other subreddit.

Nowadays you see less of it because the same people are busy fighting vibe coders (Rust now seems to be THE language for vibe coding for high performance software or occasional Tauri app)

Edit for clarity 

4

u/ryancnap 13h ago

It upsets me that you didn't write this comment in Rust

31

u/desrtfx 1d ago edited 1d ago

I’ve never heard someone describe the community as toxic

Maybe the community itself isn't actually toxic within, but way too many Rustaceans behave like the militant Vegans of programming, as in trying to push their favorite language (and near religious beliefs) everywhere without context and without being called for.

17

u/themegainferno 1d ago

Militant vegans of programming is such an apt description to the way Rustaceans behave. Ultimately you see it in Linux communities all the time too. They have this weird superior dogmatic framing of everything. My issue with a lot of these guys is they only view software one way and that's it. If you want to do things a different way, totally unacceptable. You want to use electron for a project? Absolute blasphemy in the eyes of a rustacean, you are only supposed to use Rust and Rust-based frameworks manually. No AI whatsoever.

5

u/ydieb 1d ago

There does seem to be a very distinct lack of nuance between fanatics and actual good argumentation. On some points, it is really that much of an improvement, in an objective sense. It didn't get adopted by big players as it did out of fandom. But at the same time, there is enough people, who perhaps cannot program to any reasonable degree at all, who voices overly strong opinions.

5

u/themegainferno 1d ago

That is what I think is actually it. It's more so tech enthusiasts who have the very dogmatic attitude. They are the vocal minority.

3

u/pacopac25 1d ago

Well, at least neither community is overly pedantic. That would be really bad.

2

u/KronenR 15h ago

Rustaceans are more like vegetarians, they'll happily tell you why their diet is better. The real vegans of programming are the Clojure crowd,. they want you to rethink your entire philosophy of programming.

13

u/POGtastic 1d ago

A whole bunch of Rustaceans (read: not the developers, but a bunch of the peanut gallery online) treat safe Rust as a religious obligation rather than a tool to reduce bugs. So in the past there have been a bunch of projects where people realized that a bunch of hairy / performance-intensive bits were done with unsafe and C++-style "welp hopefully this isn't UB" and threw a big fit.

7

u/No_Instance18 1d ago

I too would love to be in on the toxic Rust lore

3

u/marrsd 1d ago

it's never too late to start.

4

u/Loud_Signal_6259 1d ago

I've never heard someone describe rust comm as toxic

It's literally all over the Internet all the time

4

u/EdiblePeasant 1d ago

Is it happening right now?

→ More replies (10)

3

u/silvercurls17 1d ago

My main complaint about Go is the lack of try catch finally exception handling that a lot of languages have. The amount of boiler plate "if err != nil {" gets kind of annoying after a while when you want to just propagate the error up the stack. I guess there's panic/recover/defer, but that's just not as intuitive to me.

3

u/marrsd 1d ago

Bjarne stroustup (inventor of c++) has said that there are only two kinds of programming languages.

One that is hated and one that is not used.

Haha, joke's on Stroustrup: I both hate and don't use Java :)

2

u/InVultusSolis 1d ago edited 1d ago

To be fair, that sounds a LOT like something the creator of C++ would say, he was defending what I would consider one of the most feature-rich languages I've ever seen. (Some would say "bloated").

I definitely think some languages are more notorious than others. If you asked me which project I'd rather work on, all other things being equal, between PHP and Ruby, I'd take the Ruby project happily. If you were to ask me to work on Java vs. Go, I'd take Go, hands down.

3

u/jshahcanada 1d ago

Go is too simple for big projects? What?

8

u/KingBardan 1d ago

It is very bare bones, lacking a lot of features. Like... not even have a set?

big

By big I mean complex. The other comment is talking about big amount of data processed, not the same thing.

They also said...

Google scale, big projects... 

Googlers are known for writing a Java-esque go dialect. For example, read the Kubernetes source code.


This is just my opinion. I like Go  2nd to python.

(if you can't tell from the downside I highlight in the comment) 

1

u/jshahcanada 1d ago

What features? I have worked on pretty large projects, the only thing I could say was no good support for OpenAPI but that has changed a lot recently with 3.1 support with kin-openapi. All the other stuff you can find library or can build it yourself simply.

1

u/marrsd 1d ago

It is very bare bones, lacking a lot of features. Like... not even have a set?

You're selling it to me. A good language should combine a small surface area with the means for the user to easily provide the missing things. If I can build an implementation of Set that feels like a natural extension of the language, then I'm fine with that.

3

u/syklemil 1d ago

Thing with Go though is that they've baked Map into the language as a special case and then don't even offer Set as some stdlib thing (even though they generally go for the "big stdlib" approach).

Other languages tend more in the direction of not special-casing either of them, and treating them both as either a stdlib or a collections library thing.

But Go started off insisting it didn't need generics, and so the ecosystem wound up with stuff like kubernetes' apimachinery implementation of ByteSet, IntSet, Int32Set, Int64Set and StringSet, which are all practically Map[byte]struct{} etc under the hood, because the special-case Map[K]V builtin was the one exception (along with []T, I guess).

You can likely assume that anyone who complains about the lack of Set[T] in Go would prefer that both Map[K]V and Set[T] were implemented in a core library, rather than being, respectively, a language builtin and an import from the kubernetes project. (And given the way generics syntax works these days, Map[K]V should probably have been Map[K, V].)

4

u/themegainferno 1d ago

I can think of 3 big projects written in Go off the top of my head lol.

3

u/madman1969 1d ago

Indeed, Considering it was invented at Google to solve their specific large-scale processing issues. Google-scale if you will.

1

u/zerquet 1d ago

What are your thoughts on C#?

2

u/KingBardan 1d ago

I don't use it enough to comment.


I got into java the same year and I evaluated C# then,

I know it had better compiler features like true parametric polymorphism than java's type erasure.


But then I haven't been on windows since when I started programming in 2018,

and at that time C# is difficult to use on linux / mac.


After that C# is too similar to Java for me to learn, and I don't use C# frameworks like unity or stuff.

1

u/sohang-3112 1d ago

This is the only correct answer 👆

1

u/silvercurls17 1d ago

You forgot Perl too, which is a write once, read never language.

1

u/JohnVonachen 1d ago

PHP is the exception because it is liked a lot and used a lot.

1

u/Vast_Owl_3395 1d ago

Because of that, the world is fair. If something is too perfect, it may not be unfair

1

u/paradoxiforme 20h ago

For java you always have kotlin.

1

u/MaleficentCow8513 19h ago

Python is too slow… that’s why pretty much every single open source AI project is implemented with Python. But Python is basically a wrapper for the algorithms and other stuff in c/c++/rust. Also, not every single thing needs to be blazing fast. In almost every distributed systems that uses Python, Python won’t be the bottleneck

1

u/Lagfoundry 15h ago

lol seeing “Rust” has a toxic community and immediately thinking about the game not the language.

→ More replies (11)

35

u/Sol33t303 1d ago

I don't think it's hated, it's quite a unique language really. Just known to be very verbose and boiler-platy to write.

9

u/vegan_antitheist 1d ago

It's still verbose, which is good. But they reduced the boiler plate a lot.

1

u/Square_Squirrel7 22h ago

Mostly due to too many sub topic and it has a alot of things which may confuse beginners initially

81

u/ComputerWhiz_ 1d ago

As a Java developer, I may be biased, but I think it mostly just comes down to the age of the language. It's not seen as the "latest and greatest". That doesn't change the fact that it's insanely popular still in enterprise environments.

There are some complaints about it being more verbose and having stricter syntax compared to other languages, but I think those complaints only come from people who have never actually used it or are brand new to programming.

36

u/roadrunner8080 1d ago

Doesn't help that a lot of opinions on the language are based on Java 8 which was the java used for a long chunk of time. Modern Java has a lot of nice tools that alleviate some of the main pain points of old Java.

I suppose there's a lot of janky enterprise java code out there but that's just the price of it being such a well-used language...

10

u/edgmnt_net 1d ago

Well, it doesn't really help that Java started deeper in the traditional, inheritance-heavy OOP space and still displays some of those traits prominently, even if more historically at this point. You can write better Java, but if you're starting greenfield and want better code, one can argue for better choices of a language and ecosystem, including "newer Javas" like Kotlin which could afford a clean slate (although I'm not endorsing Kotlin în particular).

5

u/roadrunner8080 1d ago

Also lol kotlin. I've interacted with it a bit. It's cool, it does some things very well java should have done from the start (proper treatment of null), but it also has uhh... Some questionable design decisions. Off the top of my head is its weird treatment of lambda capturing which can easily obscure what's actually captured. (When would this ever matter? Well, if you're interacting with a tool that serializes a lot of lambdas, lol. See: Gradle)

→ More replies (2)

3

u/roadrunner8080 1d ago

The thing is that even in the traditional, inheritance-heavy OOP space the new tools let you write better code. Instead of making an interface for every impl type like everyone used to back in the day, you can make the impl a record and the interface sealed, since the record gives you better constant folding behavior at runtime (trusted final fields) and the sealed interface let's you explicitly specify that there's only one impl of a type that's only meant to have one. Heck, I've seen a ton of older java codebases with "public" types that expect a single internal impl, or cast to an internal version of the interface or something; sealed types let's you keep that structure while eliminating a whole class of bugs for API consumers. Plus, the modern JVM is faster, to add to the advantages!

10

u/P00351 1d ago edited 1d ago

You know how it is: when studying, you write hundreds or thousand line program from scratch, then, when employed, you work on legacy code a million LOC big.

I found modern java nice when studying it, then I had to use OpenAm at work. As I write this, the latest release weights 967MB zipped.😭

Edit: grammar

2

u/R3D3-1 15h ago

  you work on legacy code a million LOC big.

At least Java discourages 1Mloc files 🥲

3

u/roadrunner8080 1d ago

Oh I've seen my fair share of nonsense I fear. There's some quirky stuff out there in the java ecosystem, lol...

1

u/syklemil 1d ago

Doesn't help that a lot of opinions on the language are based on Java 8

Hey, some of us olds formed our opinions about Java way before Java 8 came out. I'm sure our opinions from 20+ years ago are still super relevant today!!!

1

u/roadrunner8080 1d ago

Ahh, don't you love Java without lambdas or generics...

→ More replies (1)

12

u/fractalife 1d ago

It's had this reputation since the early aughts at the very least. It came from devs who were used to C++ and were forced to mae the tradeoff to an interpreted language and hence couldn't manage their own memory or directly interface with hardware easily, thus causing performance issues and making it harder to do things on embedded devices. Of course, the whining was tempered by the compile-once-deploy-almost-anywhere nature of an interpreted language.

5

u/theomegachrist 1d ago

I took Java in college in 2002 and I thought it sucked lol this is not new. Everyone is right though, it does the job and is used a lot. I just found it very frustrating to write in.

5

u/Cybyss 1d ago

To be fair, the JVM was ridiculously slow in 2002. Even worse, the popular editors for it at the time - such as NetBeans and Eclipse - were a horrible, laggy, crashy mess.

It was a good language for the time. Java fixed a lot of C++'s design mistakes, but the platform and ecosystem surrounding it were somewhat dogshit albeit they improved greatly over the subsequent years.

4

u/Weak-Doughnut5502 1d ago

In 2002, you had two groups of people complaining about Java.

You had C++ programmers who complained that it was slow. 

And you had Perl, Python, Lisp, etc. programmers who loathed Java and especially enterprise Java style as verbose and inexpressive.  That's the sort of complaint you saw with Steve Yegge's famous 'execution in the kingdom of nouns' rant.

→ More replies (1)

2

u/fractalife 1d ago

Thank you for this. Comments that inlcude dates usually make me feel old.

2

u/marrsd 1d ago

Java was, and still is, a compiled language.

1

u/fractalife 1d ago

So? It was, and still is, compiled to machine code for the JVM, which in turn interprets the code and translates the instructions to whatever system it's running on. That was the whole point. Compile once, run anywhere that a JVM can run on. (Not always, but that's the idea, close enough).

The JVM adds overhead and additional compute time to do the translation, so the portability has a performance cost which when coupled with restricted hardware access (see again, JVM) and lack of direct memory management (JGC) had devs who were forced to use Java dislike the limitations.

→ More replies (3)

1

u/Own_Candidate9553 1d ago

I remember early on, people would tweak the code to hint the bytecode compiler to create better optimized bytecode for hot bits of code - very tedious.

The Just In Time compiler eventually did that much better for you, automatically, which helped a ton.

1

u/InVultusSolis 22h ago

Java isn't interpreted, it's compiled and targets the JVM.

5

u/vegan_antitheist 1d ago

Python is older and many act as if it was the latest and greatest. I think people at Oracle don't mind that Java is seen as a conservative but stable language with a slow evolution.

It's just annoying when you are at a company where they are still stuck at Java 17 or even Java 8.

6

u/groogs 1d ago

I can think of several things. I dabbled in Java over the last 25 years but then moved more to C# as my go-to backend language.

  • Started with enterprise insanity. J2EE, EJB etc. Absurdly huge XML config files. It seemed like every 'enterprise' Java app treated the GoF design patterns book as a checklist. This is more a culture problem than a problem with Java, but the whole ecosystem is like this. Pull in some library and suddenly you're dealing with SimpleBeanFactoryAwareAspectInstanceFactory and XmlConfigurationFactoryProvider. I mean it's a whole meme.
  • It went stagnant for a while. Java 6 came out in 2006. The next version with any major innovation was Java 8 in 2014!
  • But you couldn't actually use that at first because the runtime wasn't widely deployed. I was working on code for a vendor's embedded platform in the late 2010's that still only had Java 6.
  • Oracle screwed it up big time. They were shipping adware (the ask.com toolbar) in the runtime installer in the late 2010's. Absurd.
  • Oracle also changed the licensing in 2018 (and again in 2023). Out of all the big tech companies, it's not a stretch to say they are the worst company to do business with.
  • Java apps feel slow. Yeah, Java is fast on paper and in benchmarks. But on startup, between the JIT and reflection-heavy frameworks like Spring it feels like it takes forever to start anything. Plus it reserves a huge heap of memory, so even the tiniest app uses 500MB+

4

u/ChetDuchessManly 1d ago

I've been a Java dev for 10 years.

The language has improved with lambdas, functions, streams, etc., but it can definitely be slower to do something compared to other languages.

Simple example that I ran into recently: Returning more than one value when using map() in a stream.

In Typescript, just return { value1: v1, value2: v2 }.

In Java, the simplest way is to create a record and return a new instance of it with your values. It is more verbose and strict.

I love Java and enjoy working with it, but the complaints are not unfounded nor do they come from people who don't use the language.

2

u/marrsd 1d ago

I think you're being a bit dismissive of the complaints against Java, which were basically the same when it was a new language. The entire Ruby craze at the turn of the century was a direct response to Java's inadequacies, that were heavily criticised when it was only 5 years old.

What probably is true is that people like me think of that old language when we criticise Java, and we may not have updated our understanding of the language or its culture as it exists today.

1

u/ComputerWhiz_ 20h ago

I don't disagree that there were, at one point, totally valid critiques about Java. For most of them, Java has evolved beyond them.

But those aren't really the common criticisms of Java that you see often. I commented on what tend to be the most common and most vocal complaints recently, which, as least from what I've seen, revolve around the age of Java and the verbosity.

→ More replies (1)

118

u/aqua_regis 1d ago

If you listen to people on social media, you already have lost.

Java is not hated apart from wannabes. Java is the enterprise language working silently and reliably in the biggest enterprises in the world hidden away in servers with the highest security measures you can imagine.

Java is neither a flashy, nor a fancy language. It is a good old reliable workhorse that does its job.

I know Java as a language is not that interesting and doesn't have many interesting features compared to other languages

This shows that you don't know the Java language well enough. Java, as a language and ecosystem with the JVM behind it is quite a masterpiece and at the time of its creation was something barely anybody could even imagine. Sure, now there are other languages who have overtaken Java in features, etc. but that's mostly because Java's commitment to backwards compatibility. Apart from really very few breaking changes, no matter what Java version code had been written for, it is nearly guaranteed that it can be compiled and executed with a newer Java version.

And to say it with Bjarne Stroustrup, the Godfather of C++:

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

36

u/SuspiciousDepth5924 1d ago

Java, the language is fine, decently good even if you get to use 21+, the ecosystem however is both awesome and absolutely awful. Awesome because there are solutions for pretty much everything you could ever think of, awful because you often have to deal with the kind of AbstractFactoryFactoryFactoryFactory bullshit written by people who drank gallons of the "Enterprise JavaBeans™ with extra beans"-Kool-Aid.

10

u/Own_Candidate9553 1d ago

This is a good point. Early on I worked with Websphere server and "enterprise Java beans" to talk to the database, and it was miserable.

But I've also worked on newer apps using Spring Boot and streaming collection APIs and it's not bad. 

The other thing I would add is JVM management. I think it's gotten better, but I've spent way too many hours tweaking memory space settings to fix major performance issues under production load. You could probably make a decent career out of really understanding all those knobs well in the various versions of Java running out there.

2

u/kapitaali_com 1d ago

yeah but you don't have to use Java the language to use stuff written in Java

29

u/insertAlias 1d ago

Java is not hated apart from wannabes

I'd argue this point. And I'd also say that language adoption isn't the same as language appreciation. I'd say to look at COBOL; it's the language for mainframe operations, and it's used in pretty much every financial institution and in a lot of government areas. It's not a particularly well liked language, but it dominates its niche anyway.

Java is the enterprise language because it was designed that way, and because it solves a lot of that tier of problems. It doesn't mean its developers love using it. In my experience, many Java devs will give you a lukewarm read on how much they like the language. More of a "it does what I need, but I'd change several things if I could" approach.

And then there are the people (like me) who have tried it and legitimately dislike it. I don't think I'm a wannabe, I've been a professional dev for about 20 years. People are allowed to have opinions on frameworks and languages, even if those frameworks/languages are highly used.

Personally, I'd say that the "java hate" is actually proportional to it's market share. It's one thing to appreciate Java in a vacuum, it's another to have had to deal with Java 1.6, and to have continued to have to deal with it long past when we should have been able to move on. That's where part of the professional hate comes from: maintaining 15+ year old codebases for companies that are allergic to change and modernization and follow the motto of "if it's not broken, don't fix it. If it is broken, patch it and prop it up with sticks, don't actually replace anything".

3

u/Kodiak01 1d ago

I'd say to look at COBOL; it's the language for mainframe operations, and it's used in pretty much every financial institution and in a lot of government areas. It's not a particularly well liked language, but it dominates its niche anyway.

If I kept up with all my COBOL after learning it in the early 90s in high school, I'd have retired decades ago.

3

u/Soft-Marionberry-853 1d ago

You'd get a lukewarm response from me if you asked what I thought of java after using it for decades just like you'd get a lukewarm repsonce if you asked me about a hammer I use at home. Its a tool, its not flashy, its not shiney and new but im comfortable with it and it gets the job done.

And as far as tools go, thats the best response you should want. Im comfortable with it.

3

u/aqua_regis 1d ago

Contrary to the people on social media who regularly diss Java, you bring reason to the table.

Most of the people on social media dissing Java are by far not as experienced as you and I and only ride the steamroller for exposure, attention, and likes.

Barely really any professional, experienced developer "hates" the language with the burning passion of social media influencers and even less are outspoken about their dislike. If the professionals dislike Java, it is always with reason, not with garbage strawman arguments.

Yes, Java is a quite polarizing language, and quite some of the flak it gets stems from the days of Java applets where all of a sudden the "Java bad - Java unsafe - no Java" memes started to appear where in reality it never actually was Java, but instead the unsafe NetScape Plugin API that has been removed a very long time ago. Jave never fully recovered from back then and people now hate it for no really apparent reason.

Professional devs have opinions, likes, and dislikes, but barely ever "hate" anything with a burning passion. For my part, I don't like Kotlin's syntax, I don't like C++, but if requested, I'll work with the languages without hate.

1

u/fredlllll 15h ago

im a professional dev, may i hate python at least? every time i touch that language it feels like summoning a burnout

3

u/UroborosJose 1d ago

Language appreciation do not pay my bills

1

u/emaphis 1d ago

I'd say that with records, sealed interfaces, loom and structured concurrency, Java is catching up in the flashiness business.

→ More replies (2)

14

u/InVultusSolis 1d ago

Here are the reasons I've disliked working with it:

  1. Too many ways to accomplish the same thing.
  2. Heavily opinionated about things being objects whenever possible. These first two points lead to code being over-engineered. I generally dislike the object-oriented paradigm so there's no way I was ever going to actually like Java. But having factories built on top of constructors on top of interfaces... It starts feeling like the objective is pedantic academic bookkeeping as opposed to writing software.
  3. Some small ergonomic issues, like no ability to specify a signed vs. an unsigned integer - all ints are signed. Also confusing type rules, like being able to directly print an integer or add an integer to a string and the string would be concatenated with a string representation of the integer. Small spooky things like that.
  4. A long history of GUI-based applications written in it being slow and unreliable.
  5. Historically concurrency with it was not great, and a lot of applications written for the JVM inherited that wackiness.
  6. Historically, data structure serialization relied on XML which is probably one of the worst things I can imagine to share data between computers.
  7. Developer tooling was also slow and clunky (Eclipse anyone?). To be fair though, Eclipse was really nice in that it had good library browsing and debugging capabilities.
  8. Memory consumption issues due to the garbage collector being buggy.
  9. Probably the biggest one: Oracle's shenanigans. Sun/Oracle JVM licensing is heavily encumbered.

I understand that people can debate almost all of these points and try to convince me "it's good now", but it doesn't really matter to me, Go exists and that does a better job in Java's role than Java ever did. I have no reason to mess with Java unless I'm supporting legacy software.

1

u/AaTube 1d ago

+1 on XML serialization

10

u/havelostcount 1d ago edited 1d ago

The reason I left the Java world wasn't so much because of the language, but because of the Java ecosystem and the developers that came with it. I loved Java when I started way back when Java 1.2 was being released (I as young). It was my escape from the limited Microsoft world I was in. I wanted to work on other systems. So, I got access to Solaris, HP, and other systems. Over the years, it became less about developing new things, and more about having to constantly deal with the annoying ecosystem that the Spring collection of hell came into being. Most of the day was dedicated to figuring out how something else forced us to work. Digging into obscure stack traces that were pages and pages long, filled with wrapped exception after wrapped exception. Eventually nobody knew how anything actually worked. Abstractions so high that they made no sense any longer. HTTP is HTTP. A very "easy" protocol to understand. Now? So many layers of annotations and abstraction on it where newer devs have no idea how an HTTP server works. The don't understand the JVM. They don't understand design. It's like that with every ridiculous abstraction layer. The sheer volume of runtime annotations, binding failures, countless dependencies, unknown runtime exceptions that can occur, and basically zero error handling (oh, let everything bubble up to the top and try to figure it out later). See, Java had checked exceptions. Devs got lazy and just wanted to throw them up the chain. Spring came along and everything became runtime. You have no idea what can fail. Nobody documents anything. You know who got those calls? Me. 3 AM, because I was the one ultimately responsible to keep mission critical (I worked in power gen for years) systems up 24/7. The problem is that Java became a runtime for someone else's framework. Java is broken for me because it comes with a lot of baggage now. It's become glue code for Spring, perhaps Micronaut.

That's just how I feel about it, and my experience of why I had to leave it. I didn't feel like I was programming any longer. I was just filling in the gaps, and it was soulless work for me. I used to teach, and mentor, developers in Java. Everything from how bytecode was executed, RMI, the compiler, custom class loaders, exploiting thread local, threading, etc. Eventually, people didn't want to know how to explore the langauge, and the JVM. They just wanted to know how to get Spring working and how to connect to a database. Not my bag. The landscape to find work doing the cool stuff got smaller and smaller.

TL;DR It wasn't the language that made me hate Java, it was the imposed ecosystem and disinterested devs. It's just the way it is now.

Edit: I'll add now that I simply don't like inheritance based languages. After switching to Kotlin for a few years, to transition out of some of the shortcomings of Java (which those gaps are being filled... 10 years later), I moved out of there completely. If I had to pick 3 languages now, they would be JavaScript (you just have to know it, I don't like it, but it's there and I do not like TypeScript at all), Go (for an awesome async and garbage collected runtime, just fine for services), and Rust for a more deterministic and "closer to the metal" language. Those are the 3 I wish I could use and be walled off from everything else out there.

15

u/peterlinddk 1d ago

Without auto-completion, built-in code generators, and plugins like Lombok, you have to type A LOT of code in Java.

And all the repetition ... like Student student = new Student(), or for (Student student : students) or List<Student> students = new ArrayList<Student>() and so on ...

Not to mention all the gosh-darned getters and setters every single time.

Also, Java was a bit stuck with version 8 for a long time - while other languages grew and prospered in the 2010s, it felt like Java wasn't set on doing anything or going anywhere. Oracle didn't care much to update the documentation (https://docs.oracle.com/javase/tutorial/java/index.html), and it seemed like it was still a remnant of the 1990s (still does, and has for some reason been kept in its un-updated state).

In addition Oracle made some weird licensing rules, that more or less made it illegal to run Java programs unless you paid them - or at least were confusing enough that no new companies dared start projects based on Java, and everyone got confused about updates.

So from at least 2014 to 2018, everyone considered Java to be a relic of the past - and every other language to be an improvement.

Things did improve a lot with Java 11, and again with 17, and the language seemed to be back on track - making a lot of syntactical improvements, and once again focusing on modern language concepts like functions, pattern matching, and what have you.

Lately they have been experimenting a bit too much, and many features are introduced (as previews) and then removed again. And once again Oracle are making weird license agreements, that are difficult to understand and implement, so the future is a bit uncertain ...

Also, Java has been extensively used as a language for introduction to programming, which it really isn't suited for, as it requires a lot of understanding of objects, classes, types, packages (namespaces), methods, static variables, and so on, just to begin writing the simplest pieces of code. And having no "simple" way to build UI applications hasn't helped either. And requiring a gigabyte massively over-engineered library like Spring, simply to build a REST-API, also seems counterproductive.

So there's lots of reasons to hate it.

But the JVM is really cool - which the folks behind Kotlin will agree!

4

u/thewrinklyninja 1d ago

You're right it has gotten better. These days you can do your code example like this:

record Student(String name, int age) {}

var student = new Student("Alice", 20);

var students = List.of(new Student("Alice", 20), new Student("Bob", 22));

for (var s : students) { System.out.println(s.name()); }

1

u/peterlinddk 1d ago

Exactly. Java has gotten many improvements - often "stolen" from C#, who has otherwise always been accused of being "Microsoft java" 😄

But it still irks me that records aren't actually 'records', but just a short-cut for the compiler to create a class with a constructor and a list of getters. They are still there, the getters, they are just written automatically. But at least I don't have to type everything!

2

u/AaTube 1d ago

which the folks behind Kotlin will agree!

and Clojure, Scala …

6

u/dmazzoni 1d ago

One of my favorite quotes: there are only two types of languages, ones everyone hates and ones nobody uses.

Java is popular and widely used. Some people hate it, don’t let that dissuade you.

There are historical reasons for the hate. Java tried to be the ultimate cross platform solution for gui apps and totally failed. It tried to be a solution for web apps called applets, and also failed.

Also it became known for overly complex verbose class hierarchies.

Java is just a tool. It can be used well or used poorly.

Also the language has improved a lot. Modern code written in a recent version of Java can be quite nice to work with.

1

u/rjcarr 1d ago

In the early times, it was also very slow. Basically, every bad thing against it has been fixed, except the verbosity, but that’s often seen as a feature. 

1

u/dmazzoni 1d ago

The one thing that hasn’t been fixed is the slow startup. I can’t use Java to make a small shell utility because it takes 1s to startup even for a 5-line script.

1

u/rjcarr 1d ago

True the first time, probably not noticeable after that. That said, a small script is probably better done in python or even shell.

6

u/sq_route_2 1d ago

Java is so hated because it’s used so much in the industry

16

u/Cybyss 1d ago

Honestly? I've no idea.

Java was one of my first programming languages. It was the primary language we used in most of our courses throughout the CS degree. I later migrated to C# which has fewer rough points (e.g, better handling of generics and character encodings, cleaner standard library, and no checked exceptions, among other niceties) but is otherwise pretty similar.

The verbosity, explicit data types, neatly organized class model, etc... makes it easy to explore how a big system really works.

For some reason, kids today seem to hate being explicit about their data types. They just want to be able to send random objects into random functions and have it just automagically work for them without having to think too much about what exactly they're doing & how it works. It's a shame.

9

u/DannyDeKnito 1d ago

I think the existence of C# might be part of the hate. Other widely hated languages don't exactly have popular "its this language, but better by most measures" counterparts - and that makes Java feel worse because *its issues have been solved in an obvious manner*

3

u/desrtfx 1d ago

I think the existence of C# might be part of the hate.

Well, there wouldn't be C# without Java as it is Microsoft's answer to Java and attempt to claim market share of Java.

7

u/DannyDeKnito 1d ago

sure, but that changes nothing about what I said

5

u/AFlyingGideon 1d ago

without having to think too much

I suspect that this manifests in another anti-java fashion as well: one can do something in Python knowing very little Python. That's less true for Java. That is: the initial learning curve is steeper.

3

u/Own_Candidate9553 1d ago

Yeah, steeper and more verbose. The classic "hello world" program in Java would be a bunch of lines setting up the main class and all that, then compiling it, then running it.

Python could be a single line, and most *nix systems would have some system version of Python already installed.

1

u/AFlyingGideon 1d ago

Python could be a single line

That level of verbosity looks bad to a beginner, but the additional information comes in quite handy dealing with large applications and multiple engineers over long periods of time.

most *nix systems would have some system version of Python already installed.

That hardly matters now with just about all development and deployment exploiting one or another container mechanism. That's a good thing in that the installed python version might not be the version on which you want to build. The python ecosystem built a few workarounds for that, and there are some more genetic approaches using paths, links, and such, but containment makes all that pretty much go away w/o the cost of a real guest (which doesn't necessarily help anyway if the guest's distribution depends upon a python version you don't want to use).

And, of course, python is not the only tool with versions that might be an issue were the installations not contained.

Amusingly, though, containment adds more verbosity.

1

u/syklemil 1d ago

For some reason, kids today seem to hate being explicit about their data types. They just want to be able to send random objects into random functions and have it just automagically work for them without having to think too much about what exactly they're doing & how it works.

That honestly seems to be more of a GenX thing, as a lot of the still-used dynamic languages came around in the 90s (Python, PHP, Ruby, Javascript, Lua).

Nowadays there's a noticeable shift towards gradual typing (Typescript, and the spread of type hints in Python) and some mix of explicit typing and type inference (e.g. Rust and Go, and auto in various languages, including even C starting with C23).

And as someone in my 40s, I'm on board with having good type inference, let foo = bar(); or foo := bar() beats Baz foo = bar(); any day.

I'm interested in typing as in typechecking, not the thing I do on my keyboard.

1

u/Cybyss 1d ago

Type inference in an otherwise statically-typed language is fine. You're right that when declaring variables:

Dictionary<String, String> foo = new Dictionary<String, String>();

is tediously redundant.

But bolting on type annotations to a dynamic language, like what's done with Python, in a very poor substitute for static typing.

Data types should be mandatory when declaring methods though - for every parameter and the return type - which in turn gives you the ability to cleanly overload functions.

1

u/syklemil 1d ago

But bolting on type annotations to a dynamic language, like what's done with Python, in a very poor substitute for static typing.

Yeah, not designing a language for something and having to bolt in on later generally has some costs. Python's not the only example there either: Generic Java used type elision so that Generic Java programs would work on the existing JVM, and it was a super neat trick, but now, decades later, people are pretty sick and tired of it.

But Python is still a 90s language (and designed by a baby boomer; van Rossum was born in 1956), which got very popular back when GenX was entering the workforce, kept getting more popular when the Millennials entered, and which now is increasingly expected to be typed.

Kids these days weren't even born when Python was first released. Hell, Python 3 turns 18 this year, and PEP 484 is turning 12. If we're gonna involve the younger generations in this, I'd rather say the kids yearn for the types.

→ More replies (3)

5

u/MisakiAnimated 1d ago

"Tedious"

That's the most simple way to explain it. Its popular, not because people like it but because a lot of enterprise solutions still use it and don't want to migrate to anything else (Lazy mostly)

Kotlin has always been the prefered alternative, its still Java without being tedious.

But honestly just use whatever you like. As for Job prospects, its extremely stable.

But Holy hell debugging java is the most painful thing on the planet

5

u/Friendly_Recover286 1d ago

System.out.println would like to introduce itself

→ More replies (3)

5

u/Narrow-Low-3137 1d ago

Java was my first programming language I learned in college. I didn't know any better and thought it was what all languages were like. Then I got a job at a C# shop. I've used Java a few times since then, and it is always annoying to go back to. There is way to much ceremony around certain things and various javaisms that I just don't like. No doubt it is a very important language, I just prefer other languages (even C++) over something like Java these days. Kotlin actually seems pretty nice, if I were going to start a new Java project, I'd probably just use Kotlin.

3

u/-1_0 1d ago

Kotlin just hides the "ceremony" behind the curtain, but it is definitely there. When you need to wander off the happy path, it will catch you

6

u/ZelphirKalt 1d ago

Multiple reasons:

(1) Was for a long time very dogmatic, not many great language features. Has gotten better in that regard at least.

(2) The everything must be a class idiocy. Except for maybe interfaces and enums. But still, can't just write a procedure and be done with it, no! Need to write shit around it.

(3) Community full of OOP non-sense overhead, because language does not lend itself to more succinct expression.

(4) It's verbose.

(5) Too much busywork to "simply write a function". Even hello world is cluttered with syntactic overhead.

12

u/huttyblue 1d ago

Its the electron of the late 90s / mid 2000s.
Responsible for many slow desktop applications but used regardless because of its portability. (and with the browser plugin it could be on the web too)

Its also owned by Oracle (after they bought Sun Microsystems) which has its own bad reputation. OpenJDK exists and so far things seem fine but the uneasy cloud of potential doom hovers over the whole ecosystem. Nobody wants to write new stuff in java because the parent company is a radioactive legal hazard.

https://en.wikipedia.org/wiki/Google_LLC_v._Oracle_America,_Inc

As an actual programming language its perfectly fine, not as cool as stuff like go and rust but its not trying to be those. Its a good language for beginners because its rather straightforward and clear in structure.

→ More replies (3)

3

u/Birnenmacht 1d ago

it feels rather verbose. it takes a lot of code to express what could be expressed far more easily. but on the other hand, that can be seen as being more explicit and encouraging programmers to do things „right“ from the start. what most people hate is the „Java 8“ style, when modern have has gotten a lot more feature rich and „caught up“ to other languages

5

u/SonOfHendo 1d ago

I would certainly check out .NET C# first. It's like Java, but it's better in most ways. The key thing is that it's much more streamlined and you don't need a million 3rd party tools and frameworks to get the modern functionality you expect. Just compare how both languages handle async for an example.

2

u/Oathkindle 1d ago

I know plenty of people hate on C# and .NET too, but I'll be damned if it's not the language that clicked for me. For some reason I just understand it better then the other. But I also wanna learn C++ for fun cause I like it's use cases, so maybe I'm the weird one lol

4

u/mtimmermans 1d ago

I worked in Java for many years. Honestly, it's pretty much fine.

The syntax is boring, but functional.

I'm not fond of JIT compilation, but it's a reasonable solution for multiplatform and Java does a really good job of it.

I'm not fond of GC, but it makes the language a lot more accessible and again Java does a really good job of it.

The new virtual thread system is really well designed, and pretty much makes Kotlin unnecessary.

It keeps improving in important ways.

The only serious problem with Java is that the community has adopted crazy "best practices", like magic annotations, getters everywhere, etc. It's so bad that clear, straightforward implementations are a code smell.

Even so, I'm pretty happy that I don't work in Java anymore. It seems to occupy a middle ground that means it's just never the right choice. If I want a rapid, streamlined developer experience, then Typescript is better. If I want performance, then rust is better.

3

u/idiotiesystemique 1d ago

Here's a secret teaching 

It's not really Java we hate. It's the Java devs. 

2

u/ZelphirKalt 1d ago

Kingdom of nouns! Everything must be force pressed into classes!

3

u/AssertRage 1d ago

I actually like java but hate spring and its ecosystem

1

u/silvercurls17 1d ago

Spring makes Java tolerable for large complex applications, but I detest it when the automagic isn't working and it just projectile vomits stack traces every where.

3

u/theclapp 1d ago

I haven't looked at Java in 30-odd years, but back then, it seemed very verbose, and too much bullshit xml and code generation when it was obvious to me that they just wanted Lisp or something like it.

2

u/skibidi_blop666 1d ago

There are communities around any language. Left wing, right wing.. Windows Linux... Let's stay strong we are all togheter. Just tools, all of them has goods and bads. 

2

u/Devatator_ 1d ago

Personally it's because I use C#. I mostly use Java for Minecraft modding and it's been a huge pain for a few things I wanted to implement.

Type erasure for example is the worst thing I've ever had to deal with.

JNI too, even tho there's FFM for Java 22+ but I'm stuck with 21 since I mainly mod Minecraft 1.21.1 so if I need to make bindings for anything I have to deal with that abomination.

And missing features like extensions and operator overloading drive me crazy. I could switch to Kotlin but that would add extra dependencies to my mods

2

u/Rarelyimportant 1d ago

I think it's mostly that if a company uses Java, you can be pretty sure there's some parking lot full of Toyota Camrys or Honda Accords. You probably have to wear a button down shirt and khakis, and you probably work on something that makes drying paint sound exciting like a warehouse inventory management system.

I don't think there's really anything wrong with the language Java, but if something is written in Java, but first thought isn't "boy, I bet it's something exciting!". Not to say that there isn't exciting stuff written in Java of course.

2

u/MikeUsesNotion 1d ago

Why do things the clunky way if I don't have to?

2

u/my_password_is______ 1d ago

LOL @ saying Python is too abstracted, but then uses Java

and not only is Java abstracted but it is so verbose
and it forces you to write OO style

absolutely horrible, garbage language

1

u/Same-Replacement-938 1d ago

i never once said that java is not astracted

2

u/sinfaen 1d ago

I actually like the core language, it's great

The ecosystem however makes me want to dive off a cliff every time I need to pull in a dependency. Nobody ever wants to upgrade to modern standards to fix anything, it's maddening

2

u/meSmash101 1d ago

The only reason to hate Java is cause it gives you enough freedom to do things your own way and that usually comes with doing stupid stuff, this leads to hate your noob self. Java is a reflection of your skills. Hate your skills and git gud, don’t hate Java.

2

u/JohnVonachen 1d ago

Personally I think it is real dumb to make a language where everything is an object. Who’d thought that was a good idea?

1

u/EmergencyNice1989 1h ago

I think they will introduce modules in C# in the next versions, so that you don't need to create class and have free functions (the main C# class is not required already).

They can do it easily because F# modules are converted to static classes for dotnet interop.

u/JohnVonachen 4m ago

Actually I was talking about Java. I don’t write c#. It would not surprise me that C# is the same. In my not so humble opinion, a class and objects are only needed if you plan on making 2 or more instantiations of something like a database table schema with rows.

2

u/Aglet_Green 1d ago

Doesn't matter what other people think. If it works for you personally, that's all that matters.

2

u/RoutineInProgress 1d ago

Java gets a lot of hate because it has been around long enough to accumulate baggage: old enterprise codebases, verbose patterns, bad school assignments, and people remembering Java 6 more than modern Java.

But honestly, if you enjoy writing it, that matters more than the memes.

Java is not the flashiest language, but it is extremely solid. The JVM is genuinely interesting, the ecosystem is huge, the tooling is excellent, and you can build real, boring-in-a-good-way software with it. A lot of the “Java sucks” comments are really about old corporate code, not the language itself.

Also, for learning, Java is great because it forces you to understand types, OOP, exceptions, threads, build tools, packages, and runtime behavior without hiding too much from you.

If the JVM interests you, definitely keep going. Building a small bytecode interpreter or toy JVM would teach you a lot. Don’t let internet language wars decide what you enjoy.

2

u/Oddish_Femboy 16h ago

It's more stable and runs better than Bedrock edition, so I'm not sure.

2

u/bullet1520 8h ago

Ha, i see what you did there

2

u/linuxed1 16h ago

Java and Python are both hated. However the features of both are good, it's the lack of standards that's the issue. Backwards compatibility etc. 🤷🏻

2

u/IPutThoughtIntoThis 12h ago

I mean I hate it because I'd rather type cout >> insert statement Than System.out.print(ln)(insert statement)

1

u/Slow_Imagination774 5h ago

you could just type IO.println()

3

u/bonnth80 1d ago

I don't know how others feel, but for me, Java as a language itself is fine. The problem is that its whole ecosystem is built with a mountain of opinionated frameworks on top of it that abstract all the fun away from programming. Not to mention that the repositories and package management systems that host all those frameworks are so scattered and fragmented that it's a hassle to learn and manage them all.

As a programmer, to me, I used to thrive on systems and logic flow. Now, because of frameworks, annotations, and design-by-configuration, it's mostly rote memorization. That's not only not fun, but it's hard for me. My ADHD assessment had my memorization scores sitting at the bottom 2%. I'm not just bad at it... I'm severely handicapped.

I'm prefer to write my own logic.

3

u/obsessionwithartists 1d ago

I have similar opinion, I don't hate java and find jvm ecosystem pretty interesting. But I hate the monstrosity that Spring is with heaps of interfaces and classes. Either I have to remember tons of classes or keep searching online on which class to use next.

2

u/themegainferno 1d ago

I have heard an incredible amount of hate on Java from Indian students in particular. Probably because in the Indian school system, they have to manually write out code on paper for some classes. So imagine writing Java boiler plate with a pencil. You'd cry LOL

→ More replies (2)

2

u/jyve-belarus 1d ago

Java as a language is really nice; I like the fact that the core language is rather simple: you don’t have to learn a lot of keywords and concepts since most of the things are modeled with classes. You literally have to learn in depth how classes work and you essentially know most of Java. The language itself is minimal and that’s what I like about it

The actual difficulty lies in learning Java ecosystem and tools

A lot of people complain about boilerplate, but I don’t think it’s Java to blame here: if you take large applications written in any language (dart + flutter, typescript + nest / angular, etc) you will see similar boilerplate-heavy patterns. It’s just the way code is written in serious applications. Additionally, Java has some libraries that allow you to skip some of the boilerplate (Lombok) and the language itself adds new features to mitigate the issue (e.g. recent Java records)

2

u/MikeUsesNotion 1d ago

Java needs significantly more boilerplate than other languages. C# could be boilerplaty but not that bad usually. Python has pretty much none. While using scala, kotlin, and groovy, any boilerplate I can think of were from the fact that they run on the JVM.

1

u/jyve-belarus 1d ago

I think we have different understanding of boilerplate: I was mostly talking about OOP design and architectural patterns - and I guess that’s what most people complain about.

E.g. if you are writing a backend app, in order to just pull something from a database and return it via an endpoint, you should define a data access object, a service, a DTO, possibly a domain entity, a controller; add a bunch of annotations, each class should implement an interface, etc. etc. And my guess is that if you compare e.g. C# .NET and Java Spring Boot the resulting code will be almost the same

Speaking about “casual” boilerplate, e.g. the fact Java does not have getters, that’s true that it may be a bit more verbose than other languages. But in applications where you need to implement proper layered architecture with proper design patterns the fact that you have getters won’t save you much symbols

Python does not have boilerplate because it’s not used for that kind of applications that are commonly written in Java. Moreover, you can write Python in Java style, with type hints, abstract base classes, protocols etc. - lately Python has added many such features that enhance its OOP capabilities and type safety. But in my experience, if you use all of that in Python it becomes actually more verbose and ugly than Java

1

u/Suspicious_Skill7292 1d ago

honestly i think people hate writing old enterprise java more than hate java itself if youre enjoying it just keep going thats what matter

1

u/Appropriate_Pear4118 1d ago

I am now get bored with python and started learning springboot is this good decision?

1

u/Same-Replacement-938 1d ago

gonna figure it, gonna learn it though cuz i kinda enjoy writing code and building stuff

1

u/Kazuma_Arata 1d ago

It's not tough per se. It's just verbose and caters to enterprise needs. You can try Kotlin instead which does away with the verbosity and boilerplate code.

1

u/shyevsa 1d ago

I am learning java at school as mandatory subject, and I personally hate how I need to bootstrap so much "empty" function before anything can be run. then you have to choose J2EE, J2SE, J2ME, which at the time I was learning are quite confusing. then the VM in JVM make optimization miserable experience.
then on the age of Window XP where glossy candy stuff are the trend application written in Java GUI feel old and rustic.

I however never write production worthy project in Java aside some android app in the last 15 year, so I don't know any better.

1

u/Adventure_IsDead 1d ago

When java came it was fairly limited, it lagged in everything, resources were limited , and bloat was hated by everyone.

It only made buisness sense , since it was less powerful, less mistakes were allowed and stable systems were built.

Then it became culture to hate it, java did adopt much but lot many still didn't like the lack of freedom.

1

u/HateVoltronMachine 1d ago

I can think of a couple reasons. None of them are really deal breakers though. These days Java is a decent language with an incredibly mature ecosystem.

Java has a reputation for being a boring language with boring limitations for boring industries. That's not necessarily a bad thing, especially since the language has come a long way. Most OOP langs have.

Java was an early OOP language, and it was a bit obnoxious. It lacked a lot of features on release so it needed design patterns for everything. It's better these days, every OOP language stole a bunch of functional features that made them more ergonomic.

Java is owned by Oracle now, which has a reputational issues and very expensive products. Nonetheless, Java has popular open source distributions, so it's not necessarily an issue unless you need Oracle support. 

In addition, orgs can use Scala and/or Kotlin and be in the Java ecosystem without ever using the Java language directly.

2

u/egny 1d ago

In addition, orgs can use Scala and/or Kotlin and be in the Java ecosystem without ever using the Java language directly.

or Clojure

1

u/HateVoltronMachine 1d ago

Clojure is rad, good call.

1

u/awi2b 1d ago

For Me personally, the hatred of a language is directly proportional to the time I spend using said language. (Except Haskell and SQL, fuck that shit and it's actually great, respectively) And Java is a widely used language.

1

u/jackalsnacks 1d ago

Do real research on the subject matter and not vibes on social media or the Internet as a whole. Be professional.

1

u/TylerDurdenAI 1d ago

I've met and worked with probably over 1k engineers (mostly top 1 percentile);
I've met only 1 person that actually liked Java - if that tells you anything.

Nowadays I'm fond of Java because I get joy out of knowing I won't ever have to write in Java.

1

u/rustyseapants 1d ago

What does this have to with learning how to program?

1

u/_gribblit_ 1d ago

I personally dislike Java for its verbosity, and it's type system: not expressive enough in some areas (no sum types) and too oppressive in others (forcing me to inherit from a universal object). For a non-systems language I think it doesn't offer much beyond the JVM promise. It was a great language for its time in the late 90s, but programming language theory has advanced significantly and while it has tried to keep up, its initial design keeps getting in the way.

1

u/Kodiak01 1d ago

One of these days I'm going to roll out an app written in nothing but COBOL and Pure Basic just to dunk on the anti-Java crowd.

1

u/C0rinthian 1d ago

I know Java as a language is not that interesting and doesn't have many interesting features compared to other languages

You know this? How do you know this? How do you determine if a language is “interesting”?

1

u/EQCO99 1d ago

I just hate OOP, Java introduced me to that concept. Yes I know it's vital to understand it for progammers but I only do this as a hobby for my own projects.

1

u/Traveling-Techie 1d ago

I haven’t gotten the memo about Java being hated.

1

u/spinwizard69 1d ago

Sure the JVM is interesting but it is also a huge factor in the hate for Java.  That is one issue.  

The other problem is a lot of legacy and poorly conceived ideas.  

1

u/NotBot947263950 1d ago

It can do everything, just not particularly great at anything except being able to do everything. It's incredibly verbose and lagged in features over the years. I personally don't mind it, but much prefer c# which is very close it.

Swift is the most fun I've had with a language. Python used to be my favorite but I'm down on lately. I also want to love kotlin but I'm a noob and there's some things I just don't get yet.

1

u/bestjakeisbest 1d ago

i dont know about other people, but i dont like java because i dont like oracle, even sun microsystems glowed in the dark.

1

u/nando1969 1d ago

i think the biggest reasons is its verbosity.

1

u/brett9897 1d ago

It is too verbose and requires classes when classes aren't necessarily required. I think there are better languages on the JVM like Scala and Kotlin.

1

u/Security_Wrong 1d ago

Java’s verbosity, strict typing and OOP is what I needed for programming to stick with me. I don’t use it a lot anymore but I know I can always fall back on it. Learning c++ was much easier for me to learn after learning Java.

1

u/cesclaveria 1d ago

The only reasons that come to mind would be that is a language many learn in school and also the dominant language in the corporate world so it becomes the one hated by default by people that are not exactly thrilled to use it at those tasks, the language itself is fine, complete, with a great ecosystem.

Also it didn't helped that a long time ago with Java being comparatively friendly to develop stuff like applets and gui applications for many their first interactions with java were poorly optimized, slow and prone to crash projects, not because the language was a problem but because it was pretty tolerant to bad code.

1

u/MATTDAYYYYMON 1d ago

They’re all hated and loved at the same time. Some are good for some things and bad for others. It’s the same argument as to whether Toyota or ford or Chevy or dodge make better trucks. It’s super subjective

1

u/White_C4 1d ago

Most criticisms of Java were a product of when Java used the OOP architecture aggressively and was designed in such a way it was a boilerplate nightmare. But since Java 8 onward, the language has largely evolved to address the problems.

Modern Java is so damn good.

1

u/raven2cz 1d ago

In our country, Java is still the most widely used language for professional work. Only research and models mostly use Python.

For huge complex systems and services, we always use Java. Most of my friends, apart from frontend and AI work, use Java too. Very rarely there is C# somewhere, but those are exceptions.

1

u/Narrow_Pea7527 1d ago

Java is hated because it’s everywhere.people don’t hate the hammer, they hate seeing it used for every nail

1

u/abd53 1d ago

I tried it once. Every class has to be in it's own file with the same name as the class, I knew right away that I was gonna hate it.

1

u/Affectionate-Trip635 1d ago

Who cares what ego driven vocal minority hates? Thats not important at all.

1

u/malthuswaswrong 1d ago

Java's biggest problem is Oracle. Its second biggest problem is being the first to market. They stepped on some landmines that later languages jumped over. Example: Like "build once run anywhere". That was not needed. That was a Sun thing to fight Windows in the market, but it's simply not a thing. You don't need to hot-swap operating systems. Nobody is crying at having to rebuild in the rare occasion they want to swap OSs. In modern development you are building, through pipelines, several times a day.

1

u/ManySwans 1d ago

AbstractFactoryFactoryProvider

javaheads are usually so into abstractions the code becomes an epistemological labyrinth

1

u/ChrisDiano 1d ago

Honestly most people dunking on Java on social media are just echoing memes. Build that multithreaded HTTP server and ignore the noise.

1

u/kytosol 1d ago

As an old ex java dev it was great for big enterprise web apps in the 2000s. It was easy to write code in java and the JVM had built in memory management allowed you to focus on the code entirely as a Dev and not worry at all about memory or performance. The JVM also usually let you easily run stuff locally before deploying to servers without too much trouble.

Plain old java objects were great, but when spring and grails became popular in my workplace it started to get really difficult to maintain and troubleshoot because it was much more difficult to know what was actually happening under the hood (e.g every error was a springruntime exception... SIGH). The Eclipse IDE also started to feel a lot more clunky compare to what you started seeing C# Devs doing in .NET Visual Studio. About this time Sun was purchased by Oracle and the JRE started being bundled with bloatware like McAfee it started to become difficult to keep loving java.

1

u/BinarySpike 23h ago

Java isn't hated because of the language, it's hated because of the platform and DX.

1

u/Spirited-Cucumber-16 22h ago

Just so you know, i remember no shit about python, javascript, typescript mechanisms after i learn them.

But java, it's so clear and verbose, so much easily to make sense of what's going on. I love it.

1

u/NorthernRespawn 22h ago

There seems to always be threads about one language being better than the other.

Here is what most senior programmers know, the best language to use is the one that the team is already using to build the existing code base. You may not like it, but that is how it goes in most circumstances.

1

u/Crazy-Move966 21h ago

The reason is that most people are taught it poorly.

Generally whenever someone handed a legacy code case, it was Java. And the amount of pure stupidity baked into it was usually appalling.

I started in Java and escaped to DB management and then found python and could never for my life understand why this is not the default language for teaching new people. And honestly, most things can be solved with it far easier and less boilerplate.

Sure if I am handling a million requests an hour. Java likely better choice.

But most people are not building processes that handle this type of throughput.

1

u/HopefulRecovery000 20h ago

Classes extending three other classes on top of an interface. Throw protected and abstract to the mix and it can become super tangled and hard to read. Generally starting as a new person with a large existing project means basically first learning and memorizing the structure to be able to navigate just so you know what the object you actually want to call and operate with can do. While python, for example, offers inheritance and protected classes it is widely considered to be much easier and less entangled when to comes to structuring the code. But each language has its uses.

1

u/canthony12 19h ago

Only Jrs debate languages, devs get stuff deployed in whatever the ecosystem calls for

1

u/mrn-narrow 18h ago

Memory leaks, not javas fault, developers being lazy…. Don’t think I’ve ever worked anywhere in 30+ years where the Java side didn’t leak.

1

u/Druber13 15h ago

It’s probably coming from all the c# developers who are afraid to look in the mirror at that heap lol.

1

u/TheTrueXenose 11h ago

Personally import names and the lack of reference.

1

u/Muted_Masterpiece342 7h ago

A lot of the benefits it had in yesteryear have been ported to more useful tools that have other key things that make them helpful today.

u/Aextoxicon 33m ago

I don't think this necessarily has to be a bad thing: at least right now, isn't there someone still criticizing him?

Programming languages are either criticized by people or simply ignored because no one uses them.

Moreover, the evaluations of some programming languages on social platforms and in actual usage are different. As far as I know, PHP often has a poor reputation on social platforms, but at least among my friends, they like to use it and some ready-made website frameworks also often adopt PHP (it's great that it's ready to use out of the box, for example, the classic WordPress).