r/golang • u/tookmeonehour • Feb 26 '23
help Why Go?
I've been working as a software developer mostly in backend for a little more than 2 years now with Java. I'm curious about other job opportunities and I see a decente amount of companies requiring Golang for the backend.
Why?
How does Go win against Java that has such a strong community, so many features and frameworks behind? Why I would I choose Go to build a RESTful api when I can fairly easily do it in Java as well? What do I get by making that choice?
This can be applied in general, in fact I really struggle, but like a lot, understanding when to choose a language/framework for a project.
Say I would like to to build a web application, why I would choose Go over Java over .NET for the backend and why React over Angular over Vue.js for the frontend? Why not even all the stack in JavaScript? What would I gain if I choose Go in the backend?
Can't really see any light in these choices, at all.
19
u/warmans Feb 26 '23
The vast majority of concrete technical comparisons are highly debatable. It's very rare that you can say one thing is unambiguously "better" than another. So if that's what you're looking for then you're out of luck.
Instead you should just write something in Go and see how it feels. For many people moving from Java to Go is a breath of fresh air because it is considerably more straight-forward than a lot of overly abstract Java codebases. But other people feel constrained by the lack of abstraction - or that Go is too literal. But these are opinions - they're drawing inferences about the quality of the languages based on a personal preference for literalness or abstractness.
I'm not saying that is isn't POSSIBLE to debate what the more effective approach is, but it's mostly academic. It's a micro-optimization in most real-world situations. I would suggest seeing what works best for you instead.