TEL::0898-88889999

网站公告:

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

主营项目

  • Rust开发Web后端效率如何?
  • 男子蛋糕被小女孩踩坏,上前理论还被其家长辱骂殴打,如果发生这种事情有比***里当事人更好的处理方法吗?
  • 沃尔玛、亚马逊已开始探索发行自有稳定币,如何看待部分企业要自己发行稳定币?
  • 为什么《歌手》不请周杰伦、陈奕迅、王菲、张学友、孙燕姿、梁静茹、王力宏、林俊杰当节目嘉宾?
  • 告警管理和告警抑制的专业做法有哪些?
  • 把《武林外传》中的打工人郭芙蓉放在现代,她能干长久吗?

新闻动态

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

大部分语言都用尖括号<>表示泛型,为什么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要标新立异用中括号?
上一篇:目前最具性价比的全栈路线是啥?
下一篇:涉密计算机可以用windows10操作系统吗?