Live data from Hacker News

What makes you enjoy Go lang?

news.ycombinator.com

1–10 of 44 posts

Re: What makes you enjoy Go lang?

#3
Simplicity and a great concurrency model are the two biggest selling points. When Clojure steals your concurrency primitives and calls them "go" in your honor, you're doing something right. Blazing fast, consistent tooling don't hurt either. Personally, I find Go code to be imminently readable - I can dive into a new codebase and start understanding/navigating it almost immediately.

But I don't know if I'd choose to write a Golang project from scratch. It's got a garbage collector and sketchy C interop - not low-level enough to be used for most systems programming. But it's also not expressive enough and lacks the rich ecosystem of Python or Javascript. Jack of all trades, master of none, IMO. Golang is a solid language for HTTP web services for big teams with varied abilities, but there are better languages based on their technical merits alone.

Re: What makes you enjoy Go lang?

#4
Things I enjoy:

- compiled. So I can release a binary quite easily

- I can usually reach far without relying on third-party libraries/frameworks (e.g., http servers, json parsing, testing)

- it’s relatively easy to understand other’s people Go code

Things I don’t enjoy:

- pedantic compiler (e.g., I cannot leave unused variables in my POC/prototype code)

- hard-coding dependencies’ URLs in imports. Why not just a simple mapping in go.mod from canonical URL to friendly name?

- lack of a more powerful standard library (like Python’s)

- error handling. It’s simple, but it becomes tiring after a while. Not a huge deal, though

Re: What makes you enjoy Go lang?

#7
I prefer go because of its minimalism. Besides the basics and concurrency part, all you have is structs, Interfaces and type aliases. Even generics were absent for a while.

That prevents over engineering to a great deal unless like languages such as Python. Looking at Django for instance, tons of side mixin based views and what not. Sure, clever but hard to comprehend whereas the primary purpose of programming languages was that they were aimed at humans.

Net result is that read the code from docker to kubernetes, it's generally more understandable because the authors didn't have much margin or incentive to over engineer.

Re: What makes you enjoy Go lang?

#8
Coming from Ruby: it is fast, and compiled, but still very easy to use.

Lacking fancy features and having types and structs is a bonus when it comes to reading other people's code.

When you come back to a program that is 5 years old there's very little bit-rot and it recompiles easily. In this regard, the tendency to have everything built in Go (avoiding external OS dependencies) is a plus.

Re: What makes you enjoy Go lang?

#9
Package management. Being able to clone a random open source repository and you can more or less count on `go run .` doing what you expect. And you don't even have to wait that long because how fast it compiles.

I would however disagree on it being simple. I wouldn't use that word. The language is so barren that you end up having insufficient abstraction power to make simple things simple. Instead simple things are verbose.

As for concurrency, well the language is so simple that it's easy to misuse when you are writing concurrent programs. This is required reading for anyone beginning to write concurrent programs in Go: https://news.ycombinator.com/item?id=31698503

Post reply on HN