Golang turned out of the background (why choose Go)

Source: Internet
Author: User
This is a creation in Article, where the information may have evolved or changed. origin and Evolution
In the last 10 years, C + + has not been well developed in computing, and no new system programming language has emerged. The degree of development and system efficiency cannot be combined in many cases. Either the execution is efficient, but inefficient development and compilation, such as C + +, is either inefficient but has a valid compilation, such as. NET, Java, so a programming language with more efficient execution speed, compile speed, and development speed is needed, and go is turned out.
Go is an open source project (System development language) launched by Google, which is a programming language based on compilation, garbage collection, and concurrency. and open it up and release it under the BSD license.
The go original design was started by Robert Griesemer,rob Pike and Ken Thompson in September 2007, and the official release was in November 2009. May 2010 was publicly used by Rob Pike to apply it to a back-office system inside Google. The go language is currently supported in Google APP engine (currently supports only three types: Java, Python, and go)
Go can run on Linux, Mac OS X, FreeBSD, OpenBSD, Plan 9 and Microsof Windows systems, while also supporting a variety of processor architectures: I386, AMD64 and arm
(Note: The official website: http://golang.org
Robert Griesemer: Has helped make Java's hotspot compiler and Chrome browser's JavaScript engine V8rob Pike: A former Bell Labs UNIX team and Plan9 OS program member, Created with Thompson, UTF-8 character code Ken Thompson: is the creator of C language and UNIX. (1983 Turing Award and 1988 National Technology Awards) they have a deep understanding of system programming languages, operating systems, and concurrency.

Key Features
  • Go was designed as the C language of the 21st century, which belongs to the C language family, such as: C + +, Java, and C #, and it absorbs many of the advantages of today's programming languages.
    • The concurrency mechanism for GO is derived from CSP (communication sequential Processes), and the same mechanism is also used in Erlang.
    • Compared to C, C + +, its syntax has been greatly simplified, so that the code is more concise, clear, and has some characteristics of dynamic language
  • Based on BSD fully open source, it is free to be used by anyone for commercial purposes.
  • Language-level support for concurrency (goroutine: OS-independent threads, so multiple goroutine can be run on one OS thread or across multiple OS threads.) Goroutine is a lightweight CSP-based co-process abstracted from OS threads)
    • Add support for concurrency at the language level, rather than as a library
    • A higher level of concurrency abstraction, rather than exposing the concurrency mechanism of the OS directly.
    • Multiple goroutine are parallel.
    • The underlying mix uses non-blocking IO and threading
  • Main purpose
    • A strong type of static compilation language that combines efficiency, speed, and security while being easily programmed to make programming more enjoyable.
    • Fewer keywords and concise syntax
    • Type safety and memory security: the pointer type, but does not allow manipulation of the pointer.
    • Supports network communication, concurrency control, parallel computing, and distributed computing.
    • Programming multiple processors (or multicore) at the language level
  • Inline run-time reflection mechanism.
  • Libraries that can integrate C language implementations
  • It is not a traditional object-oriented language (without the concept of a class), but it has an interface (interface), thereby implementing polymorphic properties.
  • function is its basic constituent unit (it can also be called a function-oriented programming language)
  • is a statically typed and secure language that compiles and connects to local code (with efficient execution efficiency)
  • Supports cross-compiling and compiles the code: UTF-8
Application Areas
It was originally conceived as a system programming language, but it is also being used in distributed, high-concurrency systems such as Web Server, storage architecture, and so on. Of course, it can also be used for general word processing and as a scripting program.

The go compiler, which is embedded in the Chrome browser as a native client, can be used by Web applications to execute native code, while go can also run on Intel and ARM processors.
It is now integrated into Google App engine and is well-used in Web apps based on Google App engine infrastructure. Currently only three application development languages are supported in Gae: Java, Python, and go. (Note: Gae's link)

But it is not suitable for applications with high real-time requirements, because Go's memory model is based on garbage collection mechanism and atomic memory allocation.


Some features that are missing at the moment
At present, go on some of the features of OO is not very good support, but may be further improved in the future.
    • No overloads for functions and operators
    • Implicit type conversions are not supported to avoid bugs and confusion.
    • Classes and inheritance are not supported.
    • Dynamic code loading is not supported
    • Dynamic libraries are not supported
    • Generics are not supported
Summary
Key features of the Go language
    • Stress Simple, easy to learn
    • memory management and syntax simple
    • fast compilation
    • concurrency support
    • static type
    • deployment simple (go install)
    • Self is the document (the comment information in the code is constructed as a document via Godoc)
    • Open source free (BSD licensed)
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.