Our great sponsors
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
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.
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.