Why Choose Go language? The advantages of the Go language

Source: Internet
Author: User
Tags ruby on rails
This is a creation in Article, where the information may have evolved or changed.

Do we really need another C-style programming language in this world? It was clear that Google had thought so long ago that in 2009 it borrowed the song of the Ramones Band "hey! Ho! Let's go, officially launched the Go language. Now that the Go language development team has developed the first stable version of the language, they call it Go 1, they push the language to the world and want people to "develop robust software products and works in this language." "So how do people use this language now?"

Let's take a look at what the go language is, what prompted Google to decide to launch such a language? According to the "Frequently asked questions" in the Go language, more than more than 10 years have elapsed since the birth of the "important system-level programming language", which has changed a lot in the computer world. Google's people are deeply disappointed with the languages they currently have, and they have to choose between "Fast compiling, fast execution, or simple programming." "There is no mainstream programming language, such as C,c++,java,python, that can provide all the features that Google people want.

As a result, Google's engineers have been developing the Go language since 2007. In the FAQ, the Go language "basically belongs to the C language family" in basic grammar, but it absorbs "a lot of ideas" from the Pascal language, and some ideas come from other languages. But for programmers, it should be a new language, a programming language designed to "make programmers more efficient, make programming more efficient, or at least make us more efficient and make programming more enjoyable."

What is the Go language good at doing ...?

So what is the Go language good at doing? According to--rob Pike, one of the designer of Google's famous software engineer--go language, it is used to develop "large software".

Pike says the Go language is suitable for "large-scale software developed by many programmers, and a long development cycle that supports cloud-enabled Web services: In short, server-side software." The Go language enables programmers to develop quickly, and it makes it easier for programmers to maintain and modify the software as it grows. It combines the efficiency of a traditional compiled language with the ease of use and expression of a scripting language. (as a member of the former Bell Labs Unix development team, Pike has considerable knowledge of system software.) )

But for other types of software, the Go language works just as well. For example, I asked the user of the Go language on Google + and got a response from Douglas Fils, who is experimenting with various languages.

Fils says he now sometimes develops Web applications, mostly on the Java virtual machine (JVM) platform. "So Java is naturally the most common. I've recently started experimenting with more languages, such as Scala and Groovy. I have developed a lot of things in the Groovy language and have just completed a large project in the Groovy/grails language. I also studied Ruby on Rails/python (Python framework) and used them to do something. ”

He says he developed a WEB interface to process data resources in an earlier version of the Go language. But unfortunately. "The Go Library and syntax at the time made it difficult to develop. I also tried node. js, and by January, my energy was completely shifted to node. js. "

"It's very popular," Node.js,fils said, "Although I like it very much, but its single-threaded event loop mechanism and non-blocking programming patterns make me less satisfied." Also, all things have to be done with Javascript's callback function, which I don't like. "It is clear that he is not a fan of JavaScript. The grammar and structure of the Go language, on the other hand, is still very concise. ”

When the grammar and structure of the go language stabilized and released go 1 o'clock, he felt that he should turn back and rewrite his go language program. This time, he remember why he wanted to use Go to develop.

Arguments about the Go language

Fils said that in Java, a lot of things need to have a certain template routines, which is very annoying. He says Scala and groovy are better, but still a problem.

The go language feels like a dynamic typed language, Fils says, but the static type features in the Go language are not as obvious as in Java.

The Go language's garbage collection management is much better than the JVM. This is especially true with dynamic languages like Groovy.

Fils in the comments that the go language is much faster than other languages. It runs fast but does not affect the amount of load. It takes a short time to compile, and he can build on the development side as quickly as a dynamic language.

Finally, he says that using the Go language is much more interesting than using Node.js,java or Java-based languages, such as Ruby on Rails. I always felt like a system administrator rather than a developer when I was developing applications on the JVM platform. I want to modify the heap space, I want to study load balancing or memory issues or other resource management issues. And with the Go language, I don't need to think about that. I develop, compile, test, run, deploy, and enjoy very much.

Please note that not all people like the Go language. You can take a look at Shaneal Manek's comments about the garbage collection system for the Go language and the comparison between the scripting language and the compiled language.

Is the Go language going mainstream?

What is your expectation? According to RedMonk's Stephen O ' Grady, it is still very young for the Go language. Typically, programmers are divided into two camps: either the underlying language is welcomed or the scripting/garbage collector language is fused, or is opposed to doing so. For the latter, no surprise, they are a staunch supporter of C language.

There is a lot of controversy around the Go language, which is not surprising, in any language. And surprisingly, the Go language has gained considerable traction in programmers today. O ' Grady February put the Go language into the second tier in the RedMonk programming language grading. But, he says, considering the "Go" language is so young, "even the current results are quite impressive." ”

Google has released a stable version of the Go language, and Google app Engine supports the deployment of the language, which will add more appeal to the go language.

Whether the Go language can become a "mainstream" language needs to be judged by time. However, it seems that many companies besides Google are also interested in the language, such as Engine Yard and other companies. Programmers who are less satisfied with the current existing language are probably waiting to see the Go language.

If you use the Go language or simply skip it before, you need to be aware that go 1 introduces a lot of changes. However, from the Go 1 version, the Go language changes will follow its specifications. According to the developer of the go language, "maybe at some point we will be introducing the Go 2 specification, but until then, the program written in the go language will work correctly on future go 1 versions (Go 1.1, go 1.2, etc.). ”

Have you developed any projects in the Go language? Tell us about your sense of the Go language, is it a language with a future?

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.