Why should we learn Go? Why are big companies adopting Go

 3 minutes to read

Why should we learn Go language? Why big companies are starting to adopt the Go language

Before learning a programming language, we should know why we should learn this programming language. Just like doing a thing well, we should know the meaning of doing it, so that we can persist in doing it well when we encounter difficulties.

Why should we learn Go language? Is it bad to learn C language, and is it bad to learn Rust language?

Let’s start with the advantages of the Go language:

  1. Go is easy to learn. Is this also an advantage? Yes, if the performance of Go language is a little worse than C/C++, because Go language has garbage collection, Affecting performance, the compiler of Go language is not as well optimized as C/C++, after all, Go language is a new programming language. However, the Go language is much simpler than C++. The learning difficulty of the Go language is similar to that of Python. Students with programming experience can master it quickly. This is one of the reasons why the Go language can be widely adopted.

  2. The concurrent programming of Go language based on goroutine and channel makes concurrent programming easy to handle. The Go language supports goroutine goroutine at the language level. Goroutine can be regarded as a lightweight thread. It is easy to create a goroutine through the go keyword, making concurrent programming less difficult to handle.

  3. The Go language standard library is rich. Like the python language, the Go language standard library is rich and provides a wealth of APIs. We can simply call the standard library to implement a simple file server.

  4. The compilation speed of Go language is fast, and the executable program can be packaged into a binary file without other dependencies. Go language supports cross-compilation. If it does not depend on a specific platform, the executable file of the Linux platform can be compiled on the Windows platform.

  5. Go language has superior performance. Many Internet companies, including Google, used python before and then gradually switched to the Go language, because the performance of the Go language is better than that of python, and the learning difficulty is similar to that of python. The performance of Go language is similar to that of Java, not as good as that of C/C++, and the performance of languages ​​with garbage collection mechanism is worse than that without garbage collection mechanism.

So why are many big Internet companies using the Go language?

Let’s take a look at which big companies are using the Go language, Google, Facebook, Uber, HashiCorp, Tencent, Baidu, JD.com, Xiaomi, Didi, ByteDance, Bilibili, etc.

Why do these big companies adopt the Go language? Inseparable from the advantages of the Go language mentioned earlier:

  • Go language is easy to learn, convenient for other developers to switch to Go language or easy to recruit Go language developers

  • Go compiles quickly, is easy to deploy, and improves developer productivity

  • Go has good performance. Compared with python, the same business can use fewer servers and save costs.

Go language is not only used by large companies, but also the very famous digital currency Ethereum (ETH) is also developed in Go language, and Go language is also used to develop hacking tools.

So Go language is a very worthwhile programming language to learn!