TEL::0898-88889999

网站公告:

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

主营项目

  • 如何评价人民网评关于集中整治违规吃喝的发文?
  • 请各位参与了鸿蒙NEXT APP适配的开发者来谈一谈适配过程中的感受?
  • 如何评价Cursor?
  • 伊朗发布「霍拉姆沙赫尔-4」导弹发射画面,被认为是伊朗破坏力最强导弹,其威力有多大?
  • 你身边身材最好的女生是什么样?
  • 女生真正的完美身材是什么样子?

新闻动态

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

大部分语言都用尖括号<>表示泛型,为什么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要标新立异用中括号?
上一篇:如何评价「尖叫」这种饮料?
下一篇:该学C4D还是blender?