Go 1.18 中的 Any 是啥?
Go 1.18 因为泛型引入 any,这实际上是 interface{} 的别名: type any = interface{} 以下代码虽然不是泛型,但用 Go 1.18 可以正常运行,证明 any 和 interface{} 是一样的:(这里可以在线运行:https://gotipplay.golang.org/p/dPeNhe-7nkA) package mai
回到现实 Go Leader 对 1.18 泛型的期望
前段时间根据 Go 泛型的最新动态,我写了一篇《出泛型后 API 怎么办?Go 开发者要注意了》文章,引发了不少小伙伴的热议。Go 核心开发团队的现任 Leader @Russ Cox 在 golang-dev 中正式发表《expectations for generics in Go 1.18》对 Go 泛型给出了 期待