TEL::0898-88889999

网站公告:

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

主营项目

  • 为什么Dreamwe***er,FrontPage会被淘汰?
  • 为啥苹果不给 MacBook Pro 加上这些特性?
  • 怎么快速部署一个大模型?
  • 如何评价高圆圆的身材算是美女类型的吗?
  • 国外(GoDaddy)注册的域名如何在国内备案?
  • 家里想搞个服务器,有什么好的建议方案吗?

新闻动态

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

大部分语言都用尖括号<>表示泛型,为什么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要标新立异用中括号?
上一篇:如何看待《剑星》已登顶 Steam 全球热销榜?
下一篇:西方人是怎么发现地球是圆的的?