TEL::0898-88889999

网站公告:

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

主营项目

  • 人工智能相关专业里有什么「坑」吗?
  • 电视机为什么有大流量上传?
  • 为什么珠三角发展赶不上长三角了?
  • 我去年查出来女性***两性畸形,目前16,高二,住男寝,怎么办?
  • 做客孩子临走时带走几只玩具,我的孩子抗拒并一直哭,要怎么开导?
  • postgresql也很强大,为何在中国大陆,mysql成为主流,postgresql屈居二线呢?

新闻动态

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

大部分语言都用尖括号<>表示泛型,为什么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要标新立异用中括号?
上一篇:***如在cs中,一个玩家可以确保***局100%胜利,他能进职业队吗?
下一篇:我的设计作品很烂嘛?