欢迎来到站长教程网!

当前位置:当前位置: 首页 >

大部分语言都用尖括号<>表示泛型,为什么golang要标新立异用中括号?

时间:|栏目:{dede:type}{/dede:type}|点击:

最新的设计文档里面对这一块做了一个解释。

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要标新立异用中括号?

{dede:pagebreak/}

上一篇 : 为什么低个子男生更喜欢身材大很多的大女孩?

栏    目:{dede:type}{/dede:type}

下一篇 : 京东刘强东近期小范围分享怎么看?

本文标题:

本文地址:{dede:field name='arcurl' /}

{dede:type}更多{/dede:type}

您可能感兴趣的文章

    {dede:likearticle row='10' titlelen='80'}
  • {/dede:likearticle}
{dede:include filename="pinglun.htm"/}

阅读排行

推荐教程

  • 2025-06-20
  • 2025-06-20
  • 2025-06-20
  • 2025-06-20
  • 2025-06-20
  • 2025-06-20
  • 2025-06-20
  • 2025-06-20
  • 2025-06-20
  • 2025-06-20

| |

重要申明:本站所有的文章、图片、评论等,均由网友发表或上传并维护或收集自网络,属个人行为,与本站立场无关。

如果侵犯了您的权利,请与我们联系,我们将在24小时内进行处理、任何非本站因素导致的法律后果,本站均不负任何责任。

联系QQ: | 邮箱: