From an engineering point of view, Golang is a very wise choice for most background application scenarios. In this way, it is easy to take into account the three singularities of operational performance, development efficiency and maintenance difficulty, which makes many processes want to die.
What are the advantages of Go?
Can be directly compiled into machine code, without relying on other libraries. The version of glibc has certain requirements, and the deployment is completed by throwing a file on it.
Static type language, but it has the feeling of dynamic language. Static typed languages are the most hidden problems that can be detected at compile time. Dynamic languages give people the impression that there are many packages that can be used and the writing efficiency is very high.
Language level supports concurrency, which is the biggest feature of Go. It naturally supports concurrency. I once said that there is a difference between natural genes and plastic surgery. Everyone is equally beautiful, but do you like plastic surgery or natural genetic beauty? Go is a gene-supported concurrency, which can make full use of multi-core and facilitate the use of concurrency.
The built-in runtime supports garbage collection, which is one of the characteristics of dynamic languages. Although GC is not perfect at present, it can cope with most situations we can encounter, especially after Go 1. 1.
Easy to learn, the authors of Go language all have the gene of C, so Go naturally has the gene of C, so there are 25 Go keywords, but their expressive ability is very strong, which almost supports most of the features you have seen in other languages: inheritance, overloading, object and so on.
Rich standard library, Go has built a large number of libraries at present, especially the network library is very powerful, which is also my favorite part.
Built-in powerful tools, Go language has built-in many tool chains, and the best tool should be gofmt tool, which can automatically format the code, which can make the team review so simple, and the code format is exactly the same, so it is difficult to think differently.
Cross-platform compilation, if the Go code you write does not contain cgo, then you can compile linux applications under the window system. How come? Go refers to the code of plan9, which is independent of the system.
Embedded c support, as mentioned earlier, the author is the author of c, so Go can also directly contain c code, using the existing rich c library.
What is Weiqi suitable for:
Server programming, if you used C or C++ to do those things before, Go is very suitable, such as processing logs, data packaging, virtual machine processing, file system and so on.
Distributed system, database agent, etc.
At present, the most widely used network programming includes Web application, API application and download application.
In-memory database, groupcache developed by google some time ago, has established couchbase.
Cloud platform, at present, many foreign cloud platforms are developed by Go, CloudFoundy is partially established, and the former technical director of VMare came out to make apcera cloud platform.