This is a creation in Article, where the information may have evolved or changed.
1. Look at the go language from a python development perspective
(1) Simple deployment: Go compilation generates a static executable file with no external dependencies other than glibc. No need to worry about the application of the various packages, library dependencies, greatly reducing the burden of maintenance.
(2) Good concurrency. Goroutine and channel make it easy to write high-concurrency server-side software, and in many cases there is no need to consider locking mechanisms and the various problems that arise.
(3) Good language design. Go is designed to be very good: The specification is simple and flexible enough.
(4) High execution efficiency. Although not as C but already more than C + + and Java, and interpretation of the language compared to a different order of magnitude, such as Python,ruby.
Note:
compiled language : Before the program executes, there is a separate compilation process that translates the program into machine language, which is no longer translated when the program is executed later.
interpreted language : It is at run time to translate the program into machine language, equivalent to a translation, run again, so the speed of operation relative to the compiled language is slower.
2. See the go language from C + + perspective
(1) Go language advantage: The biggest problem in using C + + development is low development efficiency. Go language development efficiency is high. To put it simply, using the go language to write a Chan type, it takes a lot of work to do it with C + +, but it's a little easier to use C + +, but it's pretty painful.
(2) Go language Advantage: LIBC is only backward compatible, operation and maintenance is very difficult.
(3) Go language disadvantage: Go language running speed and no C language running fast. It is also necessary to improve the place. But significantly higher than C + +, in general enterprises, this operation efficiency and development rate is not enough to consider.
3. Look at the go language itself
(1) can be directly compiled into machine code, do not rely on other libraries, glibc version has certain requirements, deployment is to throw a file up on the complete.
(2) static type language. High operating efficiency.
(3) Language level support concurrency, this is the biggest feature of go, natural support concurrency.
(4) Built-in runtime, support garbage collection, which is one of the characteristics of dynamic language, so the development of high efficiency, but no loss of operational efficiency, this is a valuable place.
(5) Easy to learn, go language authors have a C gene, then go naturally has a C gene, then the GO keyword is 25, but the ability to express very strong, almost support most of the features you have seen in other languages: inheritance, overloading, objects and so on.
(6) Rich standard library, go now has built up a large number of libraries, especially the network library is very powerful.
(7) Built-in powerful tools, the go language inside a lot of tool chain, the best should be gofmt tools, automated format code, can make the team review so simple, the code format is identical, it is difficult to think differently.
(8) Cross-platform compilation, if you write the go code does not contain CGO, then you can do the window system to compile the application of Linux.
(9) Embedded C support, said the author is the author of C, so go inside can also directly contain C code, using the existing rich C library.
(10) is expected to become the next generation of Google's unified development platform, completely rid of the shadow of Java.
3.Go suitable for what to do
(1) Server programming, if you used C or C + + to do those things, with go to do very appropriate, such as processing logs, data packaging, virtual machine processing, file system.
(2) Distributed system, database agent, etc.
(3) Network programming, this piece is the most widely used
(4) Cloud platform, at present, many foreign cloud platforms in the use of Go development