5 ms·
Golang is: - the language with the best and most complete standard library - the language that is the easiest to read due to: the lack of expressiveness/gener
by baby 6y ago
Golang is:
- the language with the best and most complete standard library
- the language that is the easiest to read due to: the lack of expressiveness/generics/OOP/etc., the forced convention (by the compiler, go build, go mod, etc.), the fact that gofmt can't be customized, etc.
- due to this it is the easiest language to maintain or contribute to, because you won't spend hours trying to decipher what it's doing. You can't be too clever when you write Golang. In many languages the complexity is on the reader, but in Golang it is much more balanced. People complain about Golang being harder to write, but how boy they should really start appreciating how easy it is to read.
- and in turn one of the most secure language you can use because it's extremely simple to audit and review code in Golang. As an ex security-consultant I've reviewed many codebases in many different languages and Golang codebases were in general the most secure one (albeit nil dereference bugs).
- halfmatthalfcat 6y ago> the language with the best and most complete standard library How can this be true when language is still adopting[1] table stakes collection operators? > he language that is the easiest to read Generic programming is now a part of Go[2] [1] https://github.com/golang/go/issues/45955 https://github.com/golang/go/issues/45955 [2] https://github.com/golang/go/issues/43651 https://github.com/golang/go/issues/43651
- baby 6y agoTell me one other language, a single one, that has this in its standard library: - hex / base64 / json / xml / etc. - TLS (1.3) / x509 / aes-gcm / sha-2/sha-3 / X25519 / ECDSA / ed25519 / crypto.rand - http / html templates / json-rpc / etc. - big integer math - zip There's just so much more, and the documentation is top notch: https://golang.org/pkg/ https://golang.org/pkg/ Actually, this is just my take on what I end up using, but what's your own favorite package in Golang std lib :D?
- halfmatthalfcat 6y agoJavascript has all of that minus some of the crypto stuff. They introduced BigInt in ES2020. JS has built in json, Node has built-in tls/http.
- josephg 6y agoJavascript has a built in crypto library now too. Mind you, Go’s standard library is way better designed than javascript’s. A lot of Javascript’s API is an inconsistent mess. (Eg btoa, new TextDecoder().decode(str), string.length, etc.)
- chrisandchris 6y agoC# on DotNet will have most of it? Java probably too?
- geodel 5y agoJava does not have http server, json, html template as part of std.
- dmux 5y agoJava has had an Http Server implementation included in it since 1.6 (the "since" attribute on the page) https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver/spec/com/sun/net/httpserver/HttpServer.html https://docs.oracle.com/javase/8/docs/jre/api/net/httpserver...
- ziml77 6y agoBut there's a downside to putting things like that in the standard library. Python also went for a "batteries included approach" but it hasn't been all sunshine and rainbows. There's a reason why the Python standard library is known as the place where modules go to die: https://leancrew.com/all-this/2012/04/where-modules-go-to-die/ https://leancrew.com/all-this/2012/04/where-modules-go-to-di...
- morelisp 6y ago