• 有一个***约你出去,你会去吗?
  • 现在国内有哪些比较不错的 J***a 开源商城系统?
  • 跨平台GUI框架到底应该自绘还是原生控件绑定?
  • 有没有一个时间段,自己乐在其中,可亲人或者朋友却觉得你很辛苦,很心疼你?
  • 万兆的网络速度有多大意义?

诚信为本,市场在变,诚信永远不变...        

0896-98589990
新闻资讯
您的当前位置: 首页 > 新闻资讯

大部分语言都用尖括号<>表示泛型,为什么golang要标新立异用中括号?

发布时间:2025-06-22 17:55:18

分享到:

最新的设计文档里面对这一块做了一个解释。

Why not use the syntax F like C++ and J***a? When parsing code within a function, such as v := F, at the point of seeing the < it's ambiguous whether we are seeing a type instantiation or an expression using the < operator. This is very difficult to resolve without type information. For example, consider a statement like a, b = w < x, y > (z) Withou…。

大部分语言都用尖括号<>表示泛型,为什么golang要标新立异用中括号?

上一篇 : 一名女子在杭州万象城遭挟持被捅 20 多刀,隆胸***体救了一命,这反映出哪些公安系统的问题?

下一篇 : 如何评价“寡姐”斯嘉丽·约翰逊的身材?