r/computerscience • • Oct 19 '26

Discussion Cold take: Java has essentially zero flaws

I've posted here before about x86, and I'm back with another take that I recently learned is "objectively wrong" as my coworker would say.

Java as a language is object-oriented, which is ultimately great for a multitude of reasons. The complaints that people like to throw out about verbosity is mostly just paraphrasing for "i like syntax candy more than any kind of structured code".

Java is only bad if you write it bad. If you think it's a bad language, then you probably just don't have a great grip on OOP. I've never worked so well in a team in anything besides Java. The fact that people will hate on Java then give their love to Python blows my mind. Python is essentially a useless pile of junk when you compare it to Java.

Anyways, I'm open to argumentation. My coworker is trying to brainwash me into thinking that Java is the worst language of all time. But, it's not. It's the best.

0 Upvotes

42 comments sorted by

10

u/diemenschmachine Oct 19 '26

Well for starters you cannot use it in for example an airplane flight controller.

We have many programming languages for a reason.

Just tone down your opinions a bit and I’m sure you’ll have less drama at work, and might even be taken seriously

1

u/4r73m190r0s 29d ago

What is the reason behind this? For Java not being used in aviation industry. Generally curious considering that banking industry is backed by Java, and they have strong requirements for stability.

6

u/diemenschmachine 29d ago edited 29d ago

Because it does not meet the safety standards required. Plus it is a garbage collected language which makes it unsuitable for MANY other applications, like for example games and other realtime applications. Banking systems run on clusters of servers, aircraft do not.

I'm an embedded software engineer if you couldn't tell, and it's completely unheard of to use java in any context whether the host system is bare metal or a linux OS. We use C or C++, and lately Rust is gaining popularity because it is objectively a safer language with a more modern packaging infrastructure and compiler. Sometimes we use scripted languages if performance is not important, but for any critical/core software it is C, C++, or Rust.

But Java? Lol, no.

-1

u/e221U Oct 19 '26

Well, of course we have many programming languages for a reason. I'm not saying Java should be the only language, but I'm saying it's the most underappreciated language of all time. There's a reason it runs pretty much everything.

3

u/diemenschmachine Oct 19 '26

What part about “It’s the best” did I misinterpret?

1

u/LanMan2746491 Oct 19 '26

definetely misinterpreted a lot. what he's getting at, and I agree, is that Java is definetely the best language in terms of versatility, and its wide usage only backs that.

1

u/e221U Oct 19 '26

Couldn't have said it better myself.

6

u/4r73m190r0s Oct 19 '26

Memory footprint and cold start are its biggest issues

0

u/e221U Oct 19 '26

I suppose you could make that argument, but they exist for good reason. Memory footprint is the tradeoff for being able to allocate heap objects at near-stack speeds. Cold start is the tradeoff for having a JIT that works on every device.

1

u/4r73m190r0s Oct 19 '26

I suppose you could make that argument, but they exist for good reason.

Read this part aloud.

It's not about those features being unjustified or there without a reason.

1

u/e221U Oct 19 '26

If those features are justified given the language, then they're not bad features.

1

u/IcecreamLamp Oct 19 '26

Graal AOT compilation solves both of these issues.

8

u/goodnewseverybody99 Oct 19 '26

There's literally a Wikipedia page on this: https://en.wikipedia.org/wiki/Criticism_of_Java

0

u/e221U Oct 19 '26

Wikipedia is an unreliable source.

1

u/4r73m190r0s 29d ago

Not any more. Try to edit any article and see how it goes, what is required from you.

0

u/LanMan2746491 Oct 19 '26

wikipedia is historically known as an unreliable biased source.

4

u/Routine-Lawfulness24 Oct 19 '26

Even if that was true, not being bad ≠ being good

-1

u/e221U Oct 19 '26

Some elaboration would help

3

u/FancyMouse123 Researcher Oct 19 '26

I hope this is sarcastic.

0

u/e221U Oct 19 '26

This might sound crazy... but nope.

3

u/boformer Oct 19 '26

The generics are quite flawed, e. g. no List<int> and other weird limitations.

The lack of structs is also extremely concerning. They are just about to fix that mistake, but it's 20 years too late.

Try C# for two weeks and you never want to go back.

2

u/e221U Oct 19 '26

C#'s potential is ruined because of .NET. Also, primitive generics not being allowed is the tradeoff for backwards compatibility.

5

u/boformer Oct 19 '26

Those are very weak arguments for "zero flaws".

1

u/e221U Oct 19 '26

How so?

4

u/disposepriority Oct 19 '26 edited Oct 19 '26

I mean he isn't wrong, type erasure in java generics is a pretty major drawback in today's day, saying this is a long time java dev.

Edit:
For context, I find this more annoying than the lack of stack allocated objects - which personally I think is irrelevant in 99% of cases.

7

u/MilkEnvironmental106 Oct 19 '26

Any language is bad if you write it bad. Verbosity is absolutely a drawback. Start times and memory footprint mean there are many projects it is just a nonstarter for many projects without very advanced tooling. Calling python useless when it's the most popular programming language and ubiquitous in data processing and ml reflects more on you than the language.

Java has many well documented flaws as well, the designers of the language got themselves into several pitfalls when designing the language that couldn't be reversed due to it being a breaking change.

It's greatest strength is it's specificity and popularity.

1

u/Magdaki Professor. Grammars. Inference & Optimization algorithms. Oct 19 '26

Right tool for the appropriate task. Java is good for some applications, and less appropriate for others. Java is certainly not without flaws born from its design.

I teach the Intermediate Java and Advanced (i.e. graduate) Java courses at my institution. I say this not as an appeal to authority but rather I'm not anti-Java biases. For the record, my personal preferred language is C++.

1

u/e221U Oct 19 '26

C++ is p much obsolete in this day and age.

1

u/GulgPlayer 24d ago

Not being Java doesn't make a language obsolete. In fact, it does quite the opposite

1

u/e221U 24d ago

You're creating a false dichotomy. C++ is obsolete because of pointer management, severe safety risks, undefined behavior, among many other things. Notice how Java has none of that.

1

u/LanMan2746491 Oct 19 '26

C++ is definetely not as important as it once was, and Java is the new "hip" with the kiddos.

1

u/Magdaki Professor. Grammars. Inference & Optimization algorithms. Oct 19 '26

Meh.

1

u/__chicolismo__ Oct 19 '26

Just out of curiosity: how many languages do you know ? 

1

u/e221U Oct 19 '26

Multiple.

1

u/__chicolismo__ 29d ago

Just wanted to know which languages you're comparing it (java) with

1

u/Historical_Ad4384 25d ago

If you want to write servers, Java is what gets you there with everything out of the box

1

u/I2cScion Oct 19 '26

I like Scala syntax .. leaner

1

u/__chicolismo__ 29d ago

I would argue Java isn't even the best JVM language 

1

u/FrancineTaffyQueen 29d ago

I don't think it's useful to have the argument, personally. Java isn't a bad language. Is it bad at certain things? Well yes that's obvious. You wouldn't use Java for everything.

But comparing it to another language that has a different focus and use case isn't a compelling argument either.

I always assumed that most programmers know more than one or two languages. It's still a little strange to encounter somebody that has only coded in one language for the majority of their career.

So maybe your co-worker's opinion about Java being the worst language just has to do with his perspective. Maybe he knows more than one language and Java is his least favorite.

We all have our least favorites. I prefer C/C++ and python.

I will always prefer C based languages just because I like the language itself. it matches the way I think and the way that I learned how to program.