-
I recently saw a go generic data structures library in the wild: https://github.com/zyedidia/generic.
Anyone have any more? I'm curious what people come up with for goroutines/channels.
-
CodeRabbit
CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
-
I made this: https://github.com/nkcmr/async so I can experiment with the idea of Promises in Go. Keep in mind it's experimental and I've only lightly played around with the pattern.
-
> Go will not inline a function that exceeds complexity metrics
True, but:
> and one of those metrics is whether the function contains a range statement. You will get a real heap-allocated closure invocation on each loop.
I think this is no longer true in Go 1.18, see https://github.com/golang/go/issues/14768#issuecomment-98175... .
-
-
Undocumented early impl/design of futures: https://github.com/cretz/fut
-
I've just finished porting my gods module (Go Data Structures) to make use of generics.
https://github.com/johan-bolmsjo/gods/tree/v2
It's not much, only a simple list and an AVL tree that I've carried with me for many years. Binary search trees are useful to solve some problems because they are ordered.
I was impressed with how polished the tools where. The go-lsp plugin just worked with the new generic types. I solved all compiler errors in the editor without actually compiling anything. Did not expect that level of polish. The modules introduction broke the editor integration for many release cycles. This seems much smoother.