HACKER Q&A
📣 SilentPupper12

What language should a Java dev switch to in 2022?


I'm feeling pretty limited by Java in terms of professional opportunities. It seems like I can only really find employment at old legacy companies with it. I would like to stay as a backend dev but I'm suffering choice paralysis at this point. I know python but don't really have much professional experience with it, so I've been looking at learning a JVM based language like Kotlin or Scala, but I'm also seeing people talking about Go or Rust as the future backend languages. What would you pick to commit the next 3-4 months to in a situation like this?


  👤 gregjor Accepted Answer ✓
Don’t make a programming language part of your identity, not even your professional identity. Programmers use languages as tools.

If you have significant experience with Java you can quickly pick up C#, Go, Python, PHP, Javascript. With just a little more effort you can learn C++ or Rust. Those languages already have big footprints in back-end work, we’re past calling any of them “the future.”

To really learn a language you have to use it in practice, learn the idioms and the ecosystem. You have to know databases in some depth since those make up a big part of web back-end programming.

Domain expertise and experience with any common language (such as Java) should get you in the door, especially if you move top companies in the same or similar business domain. Right now the job market has tightened up and more programmers than usual chase fewer jobs.


👤 hlship
Clojure. Fluency in Java is a plus, due to interop. It’s a stable language - it accrues new features and gets faster but is intensely focused on backwards compatibility. I use Clojure for backend, ClojureScript for front end, and Babashka for scripting and throwaway tools.

👤 valenterry
> I'm feeling pretty limited by Java in terms of professional opportunities

I don't understand that. Java has great professional opportunities, I think you really need to look better.

But if you want to broaden your experience and get even more opportunities, I suggest:

1. Rust, if you are willing to go into low-level and embedded programming (best language for this right now) 2. Scala, if you are willing to tackle highly difficult concurrent programming and complex domains (best language for this right now in the JVM world so you can use your existing knowledge and get started easily) 3. Typescript, if you are willing to do frontend stuff and deal with the framework mess (best language on frontend by far)

Stay away from Go. This is a language for beginners. As an experienced Java dev you might like some of the parts, but the language does not "grow with you". Rust, Scala and Typescript do so.


👤 Spinosaurus
There isn't really much to learn when going from Java to Kotlin. Most Java devs with a bit of experience should be "fluent" in Kotlin within two or three days.

👤 raydiatian
What do you want to do?

Full stack: Typescript

Backend: Go, Python, Typescript

Systems: Rust, Cpp

I just want to make as much money as possible: COBOL


👤 thesuperbigfrog
Clojure: https://clojure.org/

It runs on the JVM, but it is a lot more fun than Java.


👤 roschdal
Java is still a good programming language.

👤 anta40
Kotlin is so far pleasing for me. If you want to use it for backend dev then good news is it's officially supported in Spring.

Personally, I'm a mobile app dev, switched from Java to Kotlin a few years ago.

If you want to escape the JVM club, yep I think Go is a very popular route these days.


👤 jmconfuzeus
Why do Java developers wear glasses? Because they don't C#.

👤 giantg2
I would say look at python and typescript. These seem to be very common. We still use some Java at my company but those two are starting to replace it in some areas.

👤 halfmatthalfcat
Rust. Go is played out at this point. If you wanna stay on the JVM, Scala. Echo Typescript as well for full stack.

👤 jstx1
Whichever you want; who cares if HN says Typescript or Go if you yourself don't want to work with those languages. Look for languages that look interesting to you and which also have some job opportunities.

👤 vyrotek
I'm a fan of .NET/C#. Your experience would transfer quickly.

👤 roland35
Kotlin is a great option, and isn't a big jump from Java!

👤 joshxyz
gotta start with things you want to see yourself enjoying building then work your way backwards (what languages are required for those work)

👤 stjohnswarts
Definitely C#

👤 dev_0
Lisp