3 ms·
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 e
by papaf 5y 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.
- kubb 5y agoThe 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.
- makapuf 5y agoThe 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.
- kubb 5y agoIt 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.
- dmitriid 5y agoDoesn't it also use functionality not available to userland code? Generics come to mind, but they will finally be available to everyone.
- robfig 5y agoMost 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.
- xh-dude 5y agonet/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.