38

为什么 Go 语言没有泛型 · Why's THE Design?

 4 years ago
source link: https://draveness.me/whys-the-design-go-generics
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Go 是一门语法元素少、设计简单的编程语言,简单的设计往往意味着较弱的表达能力,工程师也需要使用更多时间编写重复的逻辑。Go 语言从发布到今天已经过去了 10 多年,向 Go 语言添加泛型的讨论也从 2010 年一直持续到今天。很多人都认为 Go 语言永远不会加入泛型,然而这不是正确的结论,Go 语言很可能会在第二个主要版本中加入泛型。

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK