• 请问照片里这个人是谁呀?
  • 我在百纵科技买了一台美国CN2云服务器,如何测试是不是CN2线路?
  • 如果让你设计攻打台湾地区,你会有什么好的想法和打法?
  • 如何评价董宇辉讲述“各地厅长甚至更大的领导来我们这,站在门口等,站一个多小时。”?
  • 实体店为什么生意越来越难做了?

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

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

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

发布时间:2025-06-18 16:10:13

分享到:

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

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要标新立异用中括号?

上一篇 : 多益网络输了餐费官司,准备近几年搬离广州,你怎么看?

下一篇 : 2025 江西高考本科线历史类 486 分,物理类 429 分较去年降 19 分,怎样看待江西分数线?