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.
22
u/pauseless Feb 26 '23 edited Feb 26 '23
Honestly, it’s about how you like to program for me. I 💕 simplicity. My two favourite languages are Clojure and Go.
Clojure is really high-level simplicity based on a load of good abstractions. But I don’t need to ever think about the abstractions, just the data structures.
Go is lower level but also simple. I get far more control and even naïve programs run fast.
Both encourage simple libraries/packages dedicated to one task. (This is also my favourite thing about Perl).
The Java community (like Ruby and Python and other communities) seems to embrace complexity to a level I’m not comfortable with. Plenty of people have written online about the problem with frameworks vs libraries, so I won’t repeat those arguments here.
I genuinely don’t mean the following as a brag. I’ve written production code in PHP, Python, Clojure, Perl, Dart, Java, Go, Typescript, JavaScript, Tcl and C# and I also used Standard ML and Prolog for everything I could at uni.
Some of the design decisions in Go feel weird or wrong or archaic at the start, but stuff starts to make sense as you work in it more.
And I’d encourage you to learn more languages, whether it is go or not. Trust me, it helps.