News for hackers. Stuff that matters.
Re:Russ Cox is stepping down as the Go tech lead by valyala on Saturday August 03, 2024 @06:58AM (#41145850)
> Prior to generics I often had to write some quite complicated (and buggy) reflection code to do something I wanted (e.g. allow to pass functions that take a struct and return a struct+err to the web URL handlers, which would then get auto-JSONed).

This sounds like a good application for Go interfaces (non-empty interfaces). The majority of generics Go code I've seen could be simplified by using non-empty interfaces without the need of generics.

There are no comments on this comment yet.