欢迎来到站长教程网!

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

大部分语言都用尖括号<>表示泛型,为什么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}

下一篇 : 如何评价MiniMax开源首个视觉RL统一框架V-Triune,实现推理感知一肩挑,其技术上有何优势?

本文标题:

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

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

您可能感兴趣的文章

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

阅读排行

推荐教程

  • 2025-06-22
  • 2025-06-22
  • 2025-06-22
  • 2025-06-22
  • 2025-06-22
  • 2025-06-22
  • 2025-06-22
  • 2025-06-22
  • 2025-06-22
  • 2025-06-22

| |

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

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

联系QQ: | 邮箱: