top | item 46542916

(no title)

nh23423fefe | 1 month ago

> The stdlib is one of the most complete

what does this mean? Go lib seems tiny compared to JDK. anytime i review some Go code from adjacent team i'm turned off by weird stuff like append and slices everywhere, as well as a bunch of strange string packages

When I think of a massive stdlib I think of a language like groovy

discuss

order

MobiusHorizons|1 month ago

The api surface is relatively small, but the capabilities you get from it (http serving, json parsing, crypto, in addition to table stakes like io, args, flags etc) are very high. Having a small api surface is why you need to use primatives so often, but the upside benefit to that is there is less domain specific knowledge, since you end up using familiar types and libraries in more of your code.

CamouflagedKiwi|1 month ago

When I use Go, I find I can get more real work done with only the standard library than with any other language I've used (including Java, although that was quite a while ago now). It may not have the most stuff, it is more focused - but I'm okay with esoteric stuff not being in there since the tradeoff seems to be that there are high-quality implementations of e.g. an HTTP client and server, crypto functions, a unit testing library, JSON en/decoding etc, which I can definitely use in production. Conversely in Java the answer seems to be to use BouncyCastle / Tomcat / Jackson / etc, so while there may be a big stdlib, it ends up being less useful.

lemoncucumber|1 month ago

Python's standard library seems comparable IME

embedding-shape|1 month ago

Then ask a JS web developer what "big standard library" would mean, and Go probably would fit somehow with that definition :)

It seems to be very relative depending on where you come from.