TEL::0898-88889999

网站公告:

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

主营项目

  • 华为鸿蒙还有多久可以在pc桌面取代Windows?
  • 美国会不会重启F22生产线?
  • 谁敢公开一下自己房贷月供,占你收入的多少?对你生活影响大吗?
  • 究竟怎么学习IOS 开发啊?
  • 我们常说的“地势险要、易守难攻”“兵家必争之地”到底是怎样的?
  • 据说go和c#的开发者都说自己比较节省内存,你们认为呢?

新闻动态

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

大部分语言都用尖括号<>表示泛型,为什么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要标新立异用中括号?
上一篇:好用的大文件传输工具有哪些?
下一篇:现在已经有5K、6K、8K分辨率显示器,那么8K之后是什么?