TEL::0898-88889999

网站公告:

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

主营项目

  • 北京日报点名批评“苏超”过度娱乐化,它是否管的太宽了?为什么无良媒体不会被查封取缔?
  • 淮扬菜真的难吃吗?
  • ***如秀芹不死,李云龙会喜欢田雨吗?
  • 哪个牌子的护肤品好呀?想给妈妈买一套抗衰老的护肤品?
  • JetBrains 放弃 AppCode 是否是一个错误决定?
  • 让男朋友坐在马桶上上厕所很过分吗?

新闻动态

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

大部分语言都用尖括号<>表示泛型,为什么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要标新立异用中括号?
上一篇:歼-20 在国际上到底是什么地位?
下一篇:C盘快满了,该如何清理?