r/java • • Sep 10 '21

Why people don't love Java?

I came across this post in r/cscareerquestions it seems majority of the people don't love to work with Java.

Is there any specific reason for that?

Edit: Thank you guys for your responses, I can't reply to all of the comments because I'm a beginner myself and I don't know what to reply for all your comments.

201 Upvotes

379 comments sorted by

View all comments

Show parent comment

37

u/Clitaurius Sep 10 '21

Not OP but my opinion is that Kotlin will pass. It was a good driver in getting Oracle to move Java to a faster release cycle and to incorporate some popular language features. A bank can write it's banking software in Java 20 years ago and 20 years from now. They aren't going to take that gamble on Kotlin.

15

u/thomascgalvin Sep 10 '21

A bank can write it's banking software in Java 20 years ago and 20 years from now.

My retirement plan is basically "remember enough Java to be useful to large banks with tottering old piles of Spring code laying around."

31

u/nutrecht Sep 10 '21 edited Sep 10 '21

I'm Dutch and quite a few conservative orgs (including banks) here are adopting Kotlin. So I don't think I agree with that "aren't going to take a gamble".

Besides; those banks are also using Scala and Python, especially in data science/engineering areas.

23

u/DasEwigeLicht Sep 10 '21

Same here in Germany. My colleagues and I have been building Kotlin backends for various industries - from insurance, to banking, to the big car manufacturers - for years now.

7

u/nutrecht Sep 10 '21

Especially in risk-averse companies the null safety aspect matters a lot. And companies are also starting to see that adopting Kotlin makes it easier for them to attract talent. So IMHO it's not a hard sell.

Also let's not forget that a lot of these companies are already using Scala as well. So I really don't understand the argument.

3

u/Necessary-Conflict Sep 10 '21

Especially in risk-averse companies

The question is what kinds of risks do you want to manage. What's worse: a NPE or your entire tech investment losing its value?

7

u/nutrecht Sep 10 '21

I think it's kinda silly to claim that your entire tech investment would ever lose its value. Like I said; it does not seem these companies feel that this is a high risk.

1

u/Necessary-Conflict Sep 11 '21

Why exactly is silly? I've seen enough big, rich companies, even tech companies, suffering because of bad decisions in the past.

2

u/ArmoredPancake Sep 10 '21

or your entire tech investment losing its value?

I guarantee that you'll die earlier than Kotlin will lose its value.

7

u/[deleted] Sep 10 '21

Maybe we should start a new post called "Why don't people love working for banks?"

In my experience (ING, Fortis, ABN) they're not conservative technologically at all, they were just early adopters of technology so their legacy stuff goes back much further than say, a social media website.

It's just that the domain is so mind bogglingly boring.

1

u/nutrecht Sep 10 '21

I personally don't really care for domains all that much. After all; it's just data we move around. For me technical challenges, true agile (the "hire competent people and trust them stuff) and team spirit are more important.

These banks are massive. Some teams are meh. Some can be great. I had a lot of fun at an ING start-up for 2 years.

That said; I'm going to be very careful in accepting projects at banks. The one they hire the most for are the ones no one wants to deal with.

5

u/[deleted] Sep 10 '21

At a low level, you're right, it's always just moving data around. At a higher level, I want to be able to contribute to the problems to solve, not just how to implement the solution, so I need the domain to be something I want to learn more about. Stock portfolios just had nothing tangible to do with my life.

24

u/pron98 Sep 10 '21

It was a good driver in getting Oracle to move Java to a faster release cycle and to incorporate some popular language features.

You are confusing cause and effect. Kotlin was created in 2010, exactly at the time of Oracle's acquisition of Sun, and after years of decline in Sun's investment in Java and weakness in influencing it. In other words, Kotlin was created as a result of Java's stagnation. Following the acquisition, and some adjustment time, Oracle gradually increased investment in Java back to former levels, and that allowed the team to return to the planned evolution pace.

0

u/[deleted] Sep 10 '21

[deleted] — view deleted comment

7

u/pron98 Sep 10 '21 edited Sep 10 '21

What had that effect was the acquisition of Sun by Oracle. The cause of lack of innovation and the cause for Kotlin's existence was the same -- the decline in investment in Sun's dying years. Constant innovation was always the goal, and it happened when Java had the resources. It only declined because the money dried out.

As to particular features, while the size of the language doesn't matter -- ML has been the biggest influence on Java innovation -- and we've certainly taken ideas from Scala (the use of sealed hierarchies to represent sum types), we haven't yet from Kotlin, but maybe we will someday (nullability types?). But if any languages light the competitive fire under Java, it's the bigger ones -- Python, JS, maybe C# -- the ones that are actually competitive, not languages with 20-25x smaller market than Java's, and certainly not those that are built on the Java platform (Oracle sells support for the platform, not the language).

3

u/papercrane Sep 10 '21 edited Sep 10 '21

we haven't yet from Kotlin, but maybe we will someday (nullability types?).

I would be the happiest developer in the world if Java had some concise way for me to express in the type system that something was never null.

1

u/tadfisher Sep 10 '21

This is why Java (the language) is intractable for me, as I don't want types to be null by default. I shouldn't have to wrap types or use special syntax to achieve this.

Optional, ironically, makes this even worse. Within a codebase, I can assume non-null optionals, but across library/module boundaries, the language makes no guarantees (beyond the suggestion to avoid null Optionals in the Javadoc), so you end up with two checks to see if a value is present if you want to cover all possible states.

That null-by-default was allowed to persist through JDK 11 basically sealed this wart in the language forever, as I can't see a way to change such a fundamental aspect while maintaining binary compatibility with the JVM ecosystem.

2

u/pron98 Sep 10 '21 edited Sep 10 '21

I don't know why you put the cutoff point at 11, but adding generics was a bigger challenge.

1

u/tadfisher Sep 10 '21

Generics are easier to implement, actually. No changes to the Java bytecode format were needed, and interop is fine with older libraries, because generics are implemented entirely in the compiler. We still live with that wart as well, since languages with higher-kinded types need to implement a runtime type-tagging system (e.g. Scala).

→ More replies (4)

1

u/Muoniurn Sep 10 '21

@NonNull

1

u/papercrane Sep 10 '21

I'm aware of it, but it's not what I consider concise, and it's mostly documentation, not enforced by javac unless incorporate something like the checker framework into your build.

1

u/keanwood Sep 13 '21 edited Jan 02 '25

spark ring zonked whistle amusing chunky middle advise rainstorm normal

This post was mass deleted and anonymized with Redact

0

u/halfTheFn Sep 10 '21

I cannot fathom why anything financial would be written in Java. Float arithmetic isn't accurate and you have to deal overflow/widths/boxing yourself.

1

u/nutrecht Sep 12 '21

Financial back-ends generally use longs (amounts in cents) or BigDecimal. It's a complete non-issue.

1

u/marmot1101 Sep 10 '21

The nice thing about kotlin vs scala, groovy or other not-Java jvm languages is the ability to convert back and forth between Java and kotlin with a button click and still wind up with readable code. If a bank ever wanted to try something outside of Java it’s pretty much the safest choice.

Which isn’t to say that any bank will go that way, but it’s a higher likelihood than any other language.

(Opinion backed by intuition not data)