Hello, I’m fried fish.

Everyone is usually using Go language, that has been C, C++, Java, PHP. Why would the googlers want to develop a new language?

What about making wheels and other languages?

background

The Go programming language was conceived in late 2007 to solve some of the problems that Google encountered in developing software infrastructure.

The three designers on the picture are the original Go language designers with profound skills. From left to right, they are:

  • Robert Griesemer: Worked on Google’s V8 JavaScript engine and the Java HotSpot VIRTUAL machine.
  • Rob Pike: One of the early developers of the Unix operating system, one of the founders of UTF-8, and the designer of the Go language mascot is Rob Pike’s daughter-in-law.
  • Ken Thompson: Turing Award winner, one of the early developers of the Unix operating system, one of the founders of UTF-8, and the designer of THE C language (predecessor to B).

Problems encountered

In early interviews, Google executives reported that they felt “programming” was too much work, that they disliked C++, and that they were frustrated with the language and environment they were working in, which was full of features that didn’t work very well.

Specific problems encountered. As follows:

  • Software complexity: the problems posed by multicore processors, networking systems, massive computing clusters, and network programming models can only be temporarily circumvented rather than tackled head-on.
  • Software scale: Software scale has also changed, with today’s server programs consisting of tens of millions of lines of code, worked on by hundreds or even thousands of programmers, and updated daily (Go was reportedly dreamed up while waiting 45 minutes to compile).
  • Build time: Build times can also extend to minutes or even hours in large build clusters.

Designed to

In order to achieve these goals, adapting an existing language requires solving many fundamental problems and therefore a new language.

The new language needs to meet the following requirements:

  • Purpose: Go was designed and developed to improve productivity in this environment.
  • Design: In Go’s design, except for the more well-known aspects such as built-in concurrency and garbage collection. Also considered: strict dependency management, adaptability of software architecture as systems evolve, and robustness across boundaries between components.

The new language is now called Go.

Go on Google

Go is a programming language designed by Google to help solve Google’s problems, and Google’s problems are big.

Google’s overall application software is huge, and the hardware is huge, with millions of lines of software. The server is mainly C++, and the rest is a lot of Java and Python.

Thousands of engineers work on code, at the “head” of a single tree of all software, so major changes are made to all levels of the tree every day.

A large custom-designed distributed build system makes this scale of development feasible, but it’s still large.

Of course, all of this software runs on billions of machines that are considered a small number of independent, networked computing clusters.

In short, Google’s development is big, can be slow, and often clumsy. But it works.

The goal of the Go project is to eliminate the slowness and clumsiness of Google’s software development and make the process more productive and scalable. The language was designed by and for the people who write, read, debug, and maintain large software systems.

The purpose of Go is therefore not to study the design of programming languages, but to improve the working environment for their designers and their colleagues.

Go is more about software engineering than programming language research. Or to put it another way, it’s language design for software engineering.

Pain points

When Go was released, some claimed that it lacked specific features or methods that were considered necessary for modern languages. In the absence of these facilities, how can Go be valuable?

Our answer: Go has features that solve problems that make large-scale software development difficult.

These issues include:

  • The build is slow.
  • Uncontrolled dependencies.
  • Each programmer uses a different subset of the language.
  • Poor understanding of the program (poorly readable code, incomplete documentation).
  • Repetition of work.
  • The cost of renewal.
  • Version skeW.
  • The difficulty of writing automated tools.
  • Building across languages.

Pure single features of a language will not solve these problems, and we need to take a larger view of software engineering. So in the design of Go, we tried to focus on solutions to these problems.

conclusion

Software engineering guided the design of Go.

More than most general-purpose programming languages, Go is designed to solve a range of software engineering problems that we encounter when building large server software. This can make Go sound rather dull and industrial.

But in fact, the focus on clarity, simplicity, and composability throughout the design process has resulted in an efficient, fun language that many programmers find expressive and powerful.

The resulting Go features include:

  • Clear dependencies.
  • Clear grammar.
  • Clear semantics.
  • Composition as opposed to inheritance.
  • Simplicity provided by the programming model (garbage collection, concurrency).
  • Simple tools (Go tool, Gofmt, GoDoc, GoFix).

That’s why Go was developed, and why the design and features came about.

Did you learn? 🙂

If you have any questions, welcome feedback and communication in the comments section. The best relationship is mutual achievement. Your praise is the biggest motivation for the creation of fried fish, thank you for your support.

This article is constantly updated. You can read it on wechat by searching “Brain into fried fish”. GitHub github.com/eddycjy/blo… Already included, learning Go language can see Go learning map and route, welcome Star urged more.

reference

  • Go at Google: Language Design in the Service of Software Engineering