4 ms·
Go having a standard library that is so good for building simple services is what sets it aside from all the other languages that have come out in the last whil
by greencheeses 4y ago
Go having a standard library that is so good for building simple services is what sets it aside from all the other languages that have come out in the last while in the same space. It has a great collection of community libraries but I so rarely need to fall back to them as I can usually cobble together whatever I need to pretty easily just using the standard library.
It makes it easy to get started on a project as there is no time i need to spend thinking about the tools im going to use, its just provided all of them for me, in mostly high quality, relatively easy to use implementations of most basic things.
- euroderf 4y agoAgreed. But doesn't it seem sometimes as though some modest improvements here & there in the stdlib would have a big payoff in making it immensely more productive ?
- greencheeses 4y agoI agree, there are some ergonomic improvements that could definitly be made, something like sqlx would be nice for example
- majewsky 4y agoWhat's the value of having sqlx in the stdlib? The only reason I could see is a social one, not a technical one (discoverability). The Go devs did in the past include external libraries in the stdlib, the most significant one being "golang.org/x/context" moving to "context". This was a very important inclusion because it meant the stdlib could start offering context-aware APIs, and it was a signal to the rest of the ecosystem that the context API is stable forever and other packages can make their APIs context-aware without risk of future breakage. With sqlx, none of these issues arise: the main compatibility interfaces between different SQL libraries (particularly to the drivers providing support for different RDBMS) are already present in the stdlib.
- cbrogliato 4y agoHaving such a large standard library to me smells like you can't build one as nice as that with the language. Since it missed generics until recently I can figure out why the STD library is that good and large and why there weren't that much framework. I've used Java before it had generics too.
- majewsky 4y agoI'm not sure I understand correctly but I'm assuming that this: > Having such a large standard library to me smells like you can't build one as nice as that with the language. means that you're implying that the Go stdlib is written in non-Go because Go would not be expressive enough. If so, that's a wrong assertion. The entire Go toolchain is Go, including the compiler, runtime and stdlib. If you happen to have Go installed, you can find the stdlib at /usr/lib/go/src.