Hacker News new | ask | show | jobs
by papaf 1748 days ago
In Go, you solve problems by outputting inhuman amounts of code.

The standard library manages to pack a lot of functionality in little code. Its probably not easy to write simple concise code in Go but it is certainly possible.

1 comments

The standard library is good. If you can solve your problem by mostly using tools from the standard library in a short main package, Go works well. The work that I do unfortunately doesn't have that property.
The point you are responding to is not about using th stdlib, but implementing it. If you look at the stdlib itself, it adds lots of functionality without too much code, from scratch.
It would strengthen your point if you specified which parts of the standard library you're talking about.

Crypto stuff - yes. Reflection, AST processing, concurrent hash map - I'm not convinced. Some parts will be terser than others.

The standard library doesn't implement typical business logic. So it's not the best benchmark.

Not to mention the lack of reusable data structures.

Doesn't it also use functionality not available to userland code? Generics come to mind, but they will finally be available to everyone.
Most of it doesn't. Take a look at net/http. I'm not aware of anything it does that your package could not. Certainly nothing that would move the needle on succinctness.
net/http is a great example.

The std lib is disciplined about using safe Go ideas except in the exceptional cases. I feel like it’s nothing that is enforced by the formal spec of the language, just that the std lib has an exceptional emphasis on making it really hard to walk away with misconceptions.