Pros and cons of Go

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

1.1 Do not allow left curly braces to start another line
1.2 The compiler inexplicably adds a semicolon to the end of the line
1.3 Extreme emphasis on the speed of compilation, regardless of the function should be provided
1.4 Error handling mechanism too primitive
1.5 garbage collector (GC) is imperfect and has major flaws
1.6 Disable unused variables and extra import
1.7 How to create an object too much to be tangled
1.8 object does not have constructors and destructors
The semantic setting of 1.9 defer statement is not very reasonable
1.10 Many language built-in facilities do not support user-defined types
1.11 No generic support, common data type interface ugly
1.12 Implementing interfaces does not require explicit declaration
1.13 Omit parentheses but save curly braces
1.14 compilation generated executable file size is very large
1.15 Dynamic load class library not supported

The advantages of the Go language:
concurrency/network/performance/tools (Fmt/pprof/test)/Standard library (http/json/log/flags/atomic)/google
The true fatal flaw of the Go language garbage collector is that it can cause unpredictable intermittent pauses throughout the process.
Like some large back-Office programs, such as game servers, app containers, and so on, due to large memory consumption, the number of memory objects, GC to complete a recovery cycle, may take a few seconds or longer
Time, this period of time, the entire service process is blocked, paused, in the outside view is the service interruption, no response, and then the great concurrency mechanism here all failed. The garbage collector periodically
Start, each start will lead to a short service interruption, so that people dare to use it? This is a background server process, which is the key application area of Go language.

Xiaomi network in the use of go to develop the second version of the process of snapping up the system also encountered the go program consumes a lot of memory, the GC is slow, resulting in the service is not available problems. C language using the network framework library such as
Does Libevent/libev/libuv/acl (advanced C + + Library) offset the benefits of go without the downside of Go garbage collection? In Openresty (Nginx)
Programming on LUA is another option for developing high-performance network applications.


----------------------------------------------------------------
Go Cons
1 Go is slow, runs slower than Java, and a compiled language is slower than explanatory.
2 Go lacks security checks, and I've seen too many of the third-party package os.exit (1).
3 generics do not want to spit groove, there is no generic support
4 Err becomes the function return value as standard, write up the same, if too many, uninteresting
5: = This definition I really do not want to say anything, look at the code when the value of what type is not known, but also in-depth look at the function of the right value to see, especially not a good IDE can point to see the function definition.
Go Pros
6 There is no good engineering version management, especially for third parties on GitHub.
1 rapid development, the code is relatively concise.
2 Standard library more powerful
3 compilation is simple, and finally an executable file

----------------------------------------------------------------
The author of Plan 9 is still not Anders Hejlsberg will understand the simple truth that Plan 9 is a bit more complicated than

As a person who has developed for more than a year using Golang, I can only say that the author has either gone to the beginning or simply doesn't understand the essence of go.


Good lively, I also have a sense of participation. Recently used go to write a gadget, the overall feeling satisfied, the grammar is very clean, the package organization is more comfortable, and the concurrency is very cool. Insufficient: The IDE did not find the right
, using the Intellij+golang plug-in and litteide, compared with the mature IDE is quite a lot of difference.

Nodejs do you know that your TJ God has turned Golang? Http://www.welefen.com/about-tj-farewell-node.js-article.html


Go and Nodejs are bad languages. Node that asynchronous callback can also be blown, asynchronous callback is C + + has been playing rotten things good!
I support c#,c#ide perfect, language design is exquisite, now C # cross-platform capability is stronger than Java, C # 's Asynchronous grammar Nodejs 100 Street


Reference: http://blog.csdn.net/liigo/article/details/23699459

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.