Go Language Primer "two": Why use the Go language

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed.
Go mascot

The go language is the emerging back-end development language of Google, and the people I know use it all. After the previous period of study, make a summary.

The main advantages of the Go language

Engineered

    • Force code style, through the GOFMT tool, facilitate team collaboration.
    • Dependency Management language Level support (Gopath), similar to the use of the Maven,gradle tool in Java.
    • Container technology Docker is written in go, and the go language has a great affinity for container applications, such as cross-compiling to package only executable programs, greatly reducing the volume of containers. Since this is largely the advantage of Docker, it is half-way.
    • Cross-compiling is a convenient executable code for the target OS, making it more efficient to make command-line gadgets.
    • The open source ecosystem is rich enough to emerge with a large number of outstanding projects and third-party components. Reference: Https://github.com/avelino/awesome-go

Language itself

    • Goroutine brings a tremendous increase in performance and development speed to concurrent programming, eliminating the need for complex multithreaded code.
    • Interface is non-intrusive. Go interface is more than the function rather than the descent, canceled the Implements keyword, carried out the Deng Xiaoping theory "as long as can catch mouse is a good cat."
    • Forced use of UTF-8 encoding, garbled problem reduction
    • Fewer keywords, clear semicolons, and simple grammar.
    • Go comes with packages that meet the needs of most back-end development, which is a "back-up advantage." For example, if the log comes with a package is sufficient, and Java does not introduce log4j is difficult to flexible log. Another example is to send HTTP requests, only need to use the Net/http package is enough, Java needs to introduce apache-httpclient.

Some questions about the current go language:

    • The IDE is not rich enough, currently using the best experience is IntelliJ idea installation Golang-plugin with delve do Debug. However, the debug experience is somewhat lacking, such as not being tracked on a row-by-line basis. Reference Https://github.com/go-lang-plugin-org/go-lang-idea-plugin
    • The version is still in intense iterations, and there may be significant updates in the future that are not stable enough.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.