Golang has many advantages over Java such as simple syntax, microservice compatibility, lightweight threads, and fast performance. But are there any areas where Java is superior to Go? In which cases would you prefer to use Java instead of Go?
Hello experienced dev community,
I have 6 years of front end experience at big tech, start ups, as well the bank.
I want to transition into full stack or backend development , therefore I will be starting to learning backend tech stacks outside of work hours.
My friends suggested either Java + spring or GoLang. Apparently Java has the most mature platform and best overall supported ecosystem. As well, from landing a job perspective, most enterprise uses Java. However, he said golang is getting popular and the golang community is very motivated, although Go is utilized to write dev op tools like Terraform.
My goal is to intensively study and build a decent backend heavy project and hopefully transition into full stack / backend developer roles in 6 months.
Should I start go all in on Java?
Videos
When is it better to use java over GoLang?
I have seen several performance tests that always give GoLang the fastest and least memory and CPU usage.
The question here is why should I or any company prefer using java over GoLang?
thanks
I'm seeing recurring claims about exceptional JVM performance, especially when contrasted with languages like Go, and I've been trying to understand how these narratives form in the community.
In many public benchmarks, Go comes out ahead in certain categories, despite the JVM’s reputation for aggressive optimization and mature JIT technology. On the other hand, Java dominates in long-running, throughput-heavy workloads. The contrast between reputation and published results seems worth examining.
A recurring question is how much weight different benchmarks should have when evaluating these systems. Some emphasize microbenchmarks, others highlight real-world workloads, and some argue that the JVM only shows its strengths under specific conditions such as long warm-up phases or complex allocation patterns.
Rather than asking for tutorials or explanations, I’m interested in opening a discussion about how the Java community evaluates performance claims today — e.g., which benchmark suites are generally regarded as meaningful, what workloads best showcase JVM characteristics, and how people interpret comparisons with languages like Go.
Curious how others in the ecosystem view these considerations and what trends you’ve observed in recent years.
Background: I've been using Java for about 8 years and just started learning Golang.
So far, I'm in love with the language, and these are the top reasons:
More low-level control of memory. I hated how much the JVM's GC relied on the compactor. Objects can only be created on the heap and object arrays are arrays of pointers to non-contiguous locations in memory. Many like to say that Java has better GCs than Go, but that's because Go's memory model doesn't require such complicated GCs. It's also nice to have pointers in Go.
More paradigm-neutral. Java was designed from the beginning to be a language primarily for OO programming. Using Java for functional programming results in unnatural syntax and inefficient use of memory. Golang feels ambidextrous.
I'm still very new to Golang but as of right now, I even see it as a replacement for Node and Python in the areas of scripting and web server development. Golang's fast compile time closes makes it competitive against interpreted languages in terms of development speed, but 1-ups these languages because it gives the developer more low-level control of memory and has static typing.
I'm a student majoring in in CS and I'm interested in golang and learn it a little bit but I don't know what's the real advantage of it.
I think C# or java has better a framework now (for example Spring in java) and speed is fast enough.
and golang's orm isn't good so far.
If you guys work for company and use golang now, I want to know why you choose it.
** recently golang is frequently used in blockchain instead of C++. why?
Recently came across this post on the other sub.
Java outperforms golang
I don't buy it because native code is literally machine code and anything else(bytecode) comes with overhead
Hi folks!
Small disclaimer: I have 11 years of experience as software engineer. Started with Java (web services) and after some time (5-6 years) decided to switch to mobile development(iOS + Swift). On that time the last actual version of Java was 1.8 ver. Now, after a while I want to switch back to backend development and from here and there I read about comparisons between Java and Golang. I know what are the differences between them and understand, that there is some hype behind the Golang. I tried Golang for 2-3 month and I have some feelings, that in some aspects it's not a language for my taste. But now I just curious do anybody have an experience with switching from Java to Golang and back to Java. What were your reasons? What you didn't like in Golang.
I am with the opportunity to make a move (not a project within my company, a proper move to a go based role/company) from Java o Go.
I have worked with go before in some small projects in my company (mostly kubernetes focused), and I enjoyed, but was never “full time” or for long periods , it’s always have been a kind of “pet project” language for me.
So my question here is, have you made similar move, do you regret, do you miss the Java verbosity at all? What abou the ecosystem do you miss the nice java frameworks, do you have fun or would go back if you could?
Thanks
I cannot stress enough how much I prefer working with Go compared to Java. It's clean, simple, and, it's fun! No more factory design pattern, no more hundred lines of getters and setters, and no more shitty annotations. It all just makes sense.
When I first started, I did a lot of reading about avoiding "Writing Java code with Go". My dad was an engineer in the 80s-00s who was a very very early adopter of Java (I have more Java & OO books than you can imagine). So, it was definitely a challenge stepping back and reevaluating how I would approach a problem compared to before. Go's interface system, as an example, was extremely confusing compared to how Java does it (tho, I'm definitely a fan now of Go's). If you have any prior experience with C, you'll definitely find it much easier to transition to the language.
Lastly, just want to say thank you to the Go community! You all have been so helpful with any dumb questions I've had :)
Note: To anyone new to Go that's reading this, be sure to go through "Go by Example", Go Docs, and "Effective Go" (also recommend Go's style guide: https://google.github.io/styleguide/go/best-practices). Really helped me with getting up to speed quickly (will be going through Go's specification soon).
Which language should you choose for backend development in 2024: Golang or Java? 🤔
Let’s compare their strengths:
Performance: Which one delivers better speed and efficiency?
Ecosystem: Libraries, tools, and community support.
Scalability: Handling high-load systems.
Ease of Development: Which one is more developer-friendly?
What’s your experience with these languages?
Looking for genuine advice and not a programming language flame war. I have a 3+ years of full stack Rails+React experience, and before that a few years of DBA and Python scripting experience. My career goal is to focus on back end development and eventually work on large systems that reach many people, and of course, get that $$$.
I have a chance to choose a new team to work on, one building new microservices in Java Spring Boot, another working entirely in Golang for microservices. I have some Java familiarity from college courses and a little spring background. Which team should I choose? Focus on Java/Spring or jump to Golang? Does one language lend itself to better career prospects, or, more importantly, would one help me be a better engineer?
Edit: Cross-posted in r/ExperiencedDevs. Most of the feedback I've gotten is either 1) it doesn't matter or 2) go with Java.
In this benchmarking test, Anton the youtuber is testing REST API built using Java (Quarkus) and Go (Fiber). I always thought that Go Massively outperforms other compiled and GC languages like java and C#. But according to this test, go barely outperforms java api. This test uses Fiber which uses fast http which is faster than the standard lib net/http. The benchmark uses two tests: 1). A simple get api which returns a UUID as json 2). An api which fetches a file from local computer, saves it to amazon S3 and then saves metadata to Postgres. The 2nd test is closer to real world use case. I am studying go and could use your comments to know what could Anton do to further optimize his go app. I know a performance gain of a few seconds doesn't matter. I am just curious.
Hello,
My background is working with Go on microservices ~3 years total xp and I got a better offer (60% more) for a Java role.
The Java role seems interesting due to the $ (obviously), but also due to the nature of the scale and amount of data that I will be working with, which for my current role are not met.
I don’t want to fall into the trap of getting attached to a language or tool, but I love Go and its ecosystem. This change seems quite big, but I want to become better as a software engineer, not an expert on "x" tool.
Can practices from Go be transferred to Java, as I know the approaches are quite different? I don’t want to get opinionated and think that there is only one good way to do things.
Any opinions or feedback on this and how it can impact my career is appreciated.
Need advice from senior developers in this group. I am currently working as a full-stack JS developer and am currently looking to learn a backend language and cannot decide between Java and Go.
My goal is to eventually work on highly scalable distributed systems. So which language should I learn keeping in consideration the job market and my goal to build scalable systems? Java or Go?
Note:- I am currently based in India and would soon be moving to Toronto, Canada.
Please elucidate with reasoning. thanks!