by shakezula on 11/9/21, 3:48 PM
Something I don’t see the Go team get enough praise for is their ability to bring major language changes like generics into the language in an actually backwards compatible minor version update.
If nothing else, I find myself choosing Go frequently because it’s not going anywhere and it’s not changing.
by PaulKeeble on 11/9/21, 4:43 PM
We need a shortcut for the
if x,err = f(); err!=nil {
return _,err
}
pattern that is so common in go code. This is my biggest daily gripe and I work around it with a snippet but so much of integration code is this or a variant of it which captures the stack trace and it constantly distracts from the main flow of algorithm.
by qaq on 11/9/21, 3:19 PM
1.18 shaping up to be a great release!
My only remaining desired features:
* sum types (would be really nice)
* some equivalent of ? in Rust (can live without but would be nice)
After playing with a ton of languages have settled on Go for most projects.
by marcus_holmes on 11/9/21, 5:03 PM
Dreading the wave of shitty badly-thought-out library "updates" to include generics (and the wave of shitty new libraries from people who never learned how to use interfaces and now think they know how to use generics). It's going to be a year or so before the community settles down again after this.
by woah on 11/9/21, 3:59 PM
Generics will be insanely useful for me. I work in an environment that uses a huge Golang KV store for all persistence. This means we write all of our own indexing code etc. None of it is reusable because of the lack of generics, so each module has much of the same boilerplate for building second indexes, etc, often written in slightly different styles because it was written by different people.
Generics will let us build a set of tools for DB access and indexing tools which can be reused across all types.
by 2pEXgD0fZ5cF on 11/9/21, 7:02 PM
Been a while since I worked with Go but I'm considering it for an upcoming project.
Is there any word on a new, updated version of "The Go Programming Language" (Donovan, Kernighan) to cover all the new features since then? I really enjoyed working through that book.
If not: Any tips for a good resource to really get up to date with the new additions/changes since ~2015?
by Zababa on 11/9/21, 3:39 PM
Generics will be nice, and fuzzing is great too. I'm not a huge fan of Go itself, but it works well for my use case, websites and CLI tools. The integrated tooling (test, fuzz, race detector, benchmark, format, vet, package management, building) is very nice.
by bithavoc on 11/9/21, 3:55 PM
wow I didn't know about the workspace file, replace directives are messy. It seems like I'm going to remove 149 replace directives of my own, what a nightmare.
grep -rnw '.' --include=\*.mod -e 'replace' | grep "" -c
149
by Andys on 11/10/21, 2:00 AM
> With Go 1.17 it took 56 seconds to format all files
This sounded extremely slow to me - go fmt is normally instant. Granted, cockroachdb is a big project
But I had to download and try, and on my computer (Ryzen 5950X) it only took ~3.1s on Go 1.17. I didn't bother trying tip.
by rmanolis on 11/9/21, 3:29 PM
Now with generics, it will eat the pie from Java market.
by superbaconman on 11/9/21, 4:59 PM
Wow the IP stuff looks awesome! Generating ranges of IP addresses should have been in the stdlib for a long time.
by gauchojs on 11/10/21, 4:11 PM
Can generic sorting be implemented now ?