Why did you create a new language?
你为什么创造一种新语言?
Go was born out of frustration with existing languages and environments for the work we were doing at Google. Programming had become too difficult and the choice of languages was partly to blame. One had to choose either efficient compilation, efficient execution, or ease of programming; all three were not available in the same mainstream language. Programmers who could were choosing ease over safety and efficiency by moving to dynamically typed languages such as Python and JavaScript rather than C++ or, to a lesser extent, Java.
Go 的诞生是出于对我们在 Google 所做工作的现有语言和环境的失望。编程变得太困难了,语言的选择是部分原因。人们必须在高效编译、高效执行或易于编程之间做出选择;没有同一种主流语言同时提供这三种选项。程序员更倾向选择简单性,通过转向动态类型语言(例如 Python 和 JavaScript)而不是安全性和效率更好的 C++ 或 Java(在较小程度上)。
We were not alone in our concerns. After many years with a pretty quiet landscape for programming languages, Go was among the first of several new languages—Rust, Elixir, Swift, and more—that have made programming language development an active, almost mainstream field again.
我们并不是唯一有这种担忧的人。多年来,编程语言一直处于相当平静的状态,而 Go 是最早的几种新语言之一(Rust、Elixir、Swift 等),这些语言使编程语言开发再次成为一个活跃的、几乎是主流的领域。
Go addressed these issues by attempting to combine the ease of programming of an interpreted, dynamically typed language with the efficiency and safety of a statically typed, compiled language. It also aimed to be modern, with support for networked and multicore computing. Finally, working with Go is intended to be fast: it should take at most a few seconds to build a large executable on a single computer. To meet(实现) these goals required addressing a number of linguistic issues: an expressive but lightweight type system; concurrency and garbage collection; rigid dependency specification; and so on. These cannot be addressed well by libraries or tools; a new language was called for.
Go 通过尝试将解释型动态类型语言的编程简易性与静态类型编译语言的效率和安全性结合起来来解决这些问题。它还旨在变得现代化,支持网络和多核计算。最后,使用 Go 的目的是快速:在一台计算机上构建一个大型可执行文件最多需要几秒钟。为了实现这些目标,需要解决许多语言问题:
- 富有表现力但轻量级的类型系统;
- 并发和垃圾收集;
- 严格的依赖规范;等等。
这些问题无法通过库或工具得到很好的解决;人们需要一种新的语言。
linguistic
adj. 语言的;语言学的;
The article Go at Google discusses the background and motivation behind the design of the Go language, as well as providing more detail about many of the answers presented in this FAQ.
Google 的 Go 文章 讨论了 Go 语言设计背后的背景和动机,并提供了有关此常见问题解答中的许多答案的更多详细信息。








网友评论