Show notes
第 8 期:泛型来了!录制时间: 2022-05-06嘉宾:老貘主持:杨文,欧长坤本期摘要:这是 Go 夜聊的第八期节目,我们和 Go 语言 101 的作者一起聊了聊期待已久的泛型,我们聊到了为什么需要泛型,设计的优点、讨论时的期望与正式发布时的失望。新出现的类型集是什么?comparable 又是什么?目前的泛型设计在未来还有多大的改进空间?时间线相关链接老貘的主页Go 语言 101Go 泛型 101泛型的官方上手教程观点:类型集和接口不等价spec: document definition of comparablespec: any no longer implements comparableproposal: spec: permit values to have type “comparable”proposal: spec: permit non-interface types that support == to satisfy the comparable constraintproposal: spec: allow interface types to instantiate comparable type parametersproposal: spec: add new constraint kind satisfied by types that support == (including interface types)proposal: type parameters are comparable unless they exclude comparable typesproposal: the comparable interface represents the comparable subset of run-time valueshow to update APIs for genericsproposal: spec: allow type parameters in methods追风筝的人灿烂千阳群山回唱理解自由意志AI 新生📝 联系我们来信 [email protected]Telegram 听众群



