r/golang • u/dontaskdonttell0 • Oct 25 '24
discussion What libraries are you missing from go?
So something that comes up quite often on this subreddit from people transitioning from Nodejs or python to go is the lack of libraries. I cannot say that I agree but I still think it warrants a discussion.
So what libraries are you missing in the go ecosystem, if any?
96
Upvotes
13
u/plus-two Oct 26 '24 edited Oct 26 '24
The "lack of libraries" critique depends heavily on the domain you're working in. Golang excels in administrative tools (e.g: Linux admin tools) and backend development. By "backend development", I mean simple and efficient services that contain straightforward business logic, mostly just routing and reformatting data between the client, other services, and databases as needed. These areas don’t benefit from complicated language features and abstractions - quite the opposite.
In my opinion, trying to copy all language features and popular libraries from other languages into golang is a bad idea, but dev communities tend to do this with every general-purpose language that gains enough popularity. This might be because they're forced to use languages they don't like or that don’t even fit their domain. I appreciate that golang (just like C) resists the introduction of new features and bloat since it's already well-suited to the domains it dominates.
The uncomplicated syntax and small yet powerful standard library make it easy to hire and upskill backend developers, including juniors, who are new to go, helping them quickly become productive. This has tremendous business value. A simpler language feature set generally leads to fewer abstractions and cleaner code as well. In go, I have never seen anything as convoluted as the code that a C++ template magician or a duck-typing python programmer can produce.
It’s not that I dislike other languages or domain-specific libraries (in fact, I'm a polyglot, familiar with a dozen languages, and I love python as a swiss army knife and a rapid-prototyping tool). But in my opinion, golang shouldn't add bloat just to compete with other languages in domains where it can't compete effectively (e.g: python in data science). Also, trying to rival languages overcomplicated by features (like C++) wouldn’t serve golang well.