TEL::0898-88889999

网站公告:

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

主营项目

  • 印度为什么一定要和中国作对?
  • 黑客为什么可以做到无需知道源码的情况下找出系统漏洞?
  • 有没有GUI框架开发难度小,***消耗又不多,而且又跨平台?
  • 独立开发桌面程序(Windows)UI框架选择哪个更好?
  • 前端因为像素还原设计稿而离职,这是个别现象吗?
  • 你在出租房屋发现过什么前租客留下的“宝藏”?

新闻动态

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

大部分语言都用尖括号<>表示泛型,为什么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要标新立异用中括号?
上一篇:如何看待多地推出升级版「禁酒令」?
下一篇:刚装了2000M宽带,如何组建2.5g局域网?