TEL::0898-88889999

网站公告:

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

主营项目

  • 科学怎么解释中医把脉孕检,并且知道怀的男孩女孩?
  • Node.js是谁发明的?
  • 如何看待苹果在 WWDC25 发布的 Foundation 模型框架,它将为开发者和用户带来哪些改变?
  • 为什么一谈到Wi-Fi想支持6GHz,总有人说那你可以去国外?
  • 《甄嬛传》中祺贵人为什么和甄嬛反目?
  • 如何看待 Git 的 Windows 安装程序称 Vim「很难用」?

新闻动态

当前位置: 首页 > 新闻动态

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

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

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要标新立异用中括号?
上一篇:公立医生帮联系民营救护车,800 公里收费 2.8 万元,收费合理吗?救护车收费标准是什么?
下一篇:伊朗称袭击以色列「网络首都」,该地聚集英特尔、微软等多家高科技企业,伊朗为何选择这里?会造成哪些影响?