Re:Go 1.27 Interactive Tour
by scotty79 on Sunday August 02, 2026 @06:14AM
(#49142972)
> (b Box[T]) Map[U any](f func(T) U) Box[U]
Eh... I think you'd need to avoid generics altogether.
[ Parent
| on HN ]
that's literally what Go was supposed to do! If I want a language like C++, I know where to find a language like C++ (it's C++).
Map/Filter/Reduce is a bad example for an imperative language. But look at slices and maps packages, or the new proposal for container types. There are many good examples how generics are like salt to food. Another example is errors.AsType.