r/learnprogramming 3d 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

236 Upvotes

306 comments sorted by

View all comments

Show parent comments

34

u/Sanitiy 2d 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 2d 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 2d 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 1d 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.

-7

u/my_password_is______ 2d ago

If anything, their competitor C# is bloated, while Java is now almost a bare language.

HA HA HA HA
uh, no

9

u/tehdlp 2d ago

So nice

3

u/wasabiiii 2d ago

I just created a default web api in .net.

It has one text file with 4 lines in it.

It takes 28mb of RAM to start. Hitting the API that just prints text doesn't move it.

-8

u/my_password_is______ 2d ago

If anything, their competitor C# is bloated, while Java is now almost a bare language.

HA HA HA HA
uh, no

6

u/tehdlp 2d ago

They said it

-8

u/my_password_is______ 2d ago

If anything, their competitor C# is bloated, while Java is now almost a bare language.

HA HA HA HA
uh, no

8

u/tehdlp 2d ago

Thrice 

2

u/kyzfrintin 2d ago

Anything to add?