TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Upcoming Features in Go 1.18

2 点作者 SebastianM超过 3 年前

1 comment

raxxorrax超过 3 年前
From here which was linked in the article: <a href="https:&#x2F;&#x2F;bitfieldconsulting.com&#x2F;golang&#x2F;generics" rel="nofollow">https:&#x2F;&#x2F;bitfieldconsulting.com&#x2F;golang&#x2F;generics</a><p>Why [T comparable] and not [T constraints.Comparable]?<p>One is inbuilt, the other is just an interface defined in a package? Compiler would check if the types all implement the required operators in both cases, no?<p>I am no Go programmer and don&#x27;t know the language specification, just asking out of curiosity.