【发布时间】:2021-01-17 00:39:13
【问题描述】:
我尝试在design draft (The Next Step for Generics) 上运行示例 go2go.playground
type Pair(type T) struct { f1, f2 T }
,但得到一个错误
prog.go2:14:11: expected type, found 'type' (and 1 more errors)
在哪里可以找到实际的go generics design draft?
【问题讨论】:
-
你想达到什么目的?
-
我尝试测试提供的
generic实现,并将其与其他语言实现进行比较
标签: go generics go-playground go-2