Generic methods coming to Go
Proposal for adding generic methods to structs (not interfaces) accepted last month ✨
While not giving us everything we could want, it's still gonna be a welcome feature.
17
CommentsProposal for adding generic methods to structs (not interfaces) accepted last month ✨
While not giving us everything we could want, it's still gonna be a welcome feature.
The Go team is working on a new garbage collector called Green Tea.
https://github.com/golang/go/issues/73581Open linkView original on programming.devIn the original proof of concept for ranging over functions, iter.Pull was implemented via goroutines and channels, which has a massive overhead.
When I dug in to see what the released code did I was delighted to see that the go devs implemented actual coroutines to power it. Which is one of the only ways to get sensible performance from this.
Will the coro package be exposed as public API in the future? Here's to hoping ♥️
https://github.com/golang/go/blob/master/src/runtime/coro.goOpen linkView original on programming.devGo 1.22 will ship with "range over int" and experimental support for "range over func" 🥳
https://github.com/golang/go/issues/61405#issuecomment-1782052910Open linkView original on programming.dev