logoalt Hacker News

Xeoncrossyesterday at 7:34 PM2 repliesview on HN

> First, generic methods are now supported > Generic functions can now be used without explicit type arguments

Great! This was an ergonomic code issue I hit when trying to create a universal handler/controller generic that could hydrate/populate function arguments (from a request body) without having an actual copy of the arguments: https://github.com/xeoncross/mid/blob/main/handler.go#L12


Replies

knoctetoday at 4:21 AM

Can proper Result/Option types be created for Go now?

show 1 reply
iaaanyesterday at 8:23 PM

Neat, stealing this.

show 1 reply