网站地图官方微信:
网站首页 夏店镇 建昌镇 黑台镇 伊春市 哲桥镇 泮水镇

当前位置: 首页 >

大部分语言都用尖括号<>表示泛型,为什么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要标新立异用中括号?

  • | 如何评价张靓颖刘宇宁《九万字》? |

    终于集齐三大女神。 张靓颖的眼镜,戴与不戴真的是判若两人。...

    查看详情>>
  • | 2025年6月了,深圳房价咋样? |

  • | 为什么中国足协成了“过街老鼠”了? |

  • | PHP现在真的已经过时了吗? |

  • | 穿瑜伽裤爬山的女生会不会害羞? |

  • | 你健身是为了什么? |

  • | 想初尝苹果Mac电脑,纯体验,选 Macbook air 还是 pro? |

  • | 既然C#等开源语言,为啥***le还要弄个基本上一模一样的Swift? |

  • | 湖北省荆州市为什么发展不起来? |

  • | 印巴大战,背后大国为何都不发声? |

  • | 为什么 macOS 并不差,可市场总敌不过 Windows? |

  • 就不想用rust吗?局面打开,j***a写一堆class太臃...

    2025-06-20
  • 刷抖音,看到一套大理的别墅,主人着急脱手,房产面积200平,...

    2025-06-20
  • 精彩,太精彩了 史上最有魅力的杨国忠 生动展示了什么叫“智足...

    2025-06-20
  • 一个社区语言能泛起多大浪花?PHP30周年线上活动PHPve...

    2025-06-20

关注我们

添加微信好友,关注最新动态