Go language Introduction and video tutorial

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

It contains basic go language tutorials, and development tools.

Http://pan.baidu.com/s/1eQ1fd3W

1 Introduction

The go language is a new programming language launched by Google that can reduce the complexity of your code without compromising application performance. Rob Pike, Google's Chief software engineer, said: "We've developed go because software development has been frustrating over the last more than 10 years." Go is the second Google 2009 release programming language. In July 2009, Google released the simple language, a basic language used to develop Android apps. Beijing time January 10, 2010, go language picked Tiobe released the 2009 annual award. The award was awarded to the programming language with the largest increase in market share in 2009. "Go gives me the experience I've never had before," said Rob Pike, Google's senior software engineer, Rob Paik. Parker says that today's C + + or C, go is a system language. "Using it for rapid development, and it's a true compilation language, we're now opening it up because we think it's very useful and powerful," he explains. "In 2007, Google started research and development on go as a 20% project, which allows employees to devote 20% of their jobs to the project. In addition to Parker, members of the project also have some other Google engineers. Parker says that after compiling the go code, the run speed is very close to the C language, and the compilation speed is very fast, as if using an interactive language. None of the existing programming languages have been specifically optimized for multicore processors. Go is a language that Google engineers write for such programs. It is not designed for beginners, but learning to use it is not very difficult. Go supports object-oriented, with features such as true encapsulation (closures) and reflection (reflection). In terms of learning curve, Parker thinks go is similar to Java, and it should be easy for Java developers to learn go. The reason to publish go as an open source project is to give the open source community the opportunity to create better tools to use the language, such as plugins in the Eclipse IDE. Go was not used in all of Google's publicly available Web applications, but Google has developed several in-house projects using the language. Parker said that whether go will have an impact on Google's upcoming Chrome OS, too early is too early, but go can indeed be used with native client. "Go allows apps to run perfectly in the browser," he says. "For example, using go can make wave more efficient, both in the front-end and in the background. Go also has two compilers, one based on GCC and one set of compilers (6g and 8g) for 64-bit x64 and 32-bit x86 computers, respectively. Gccgo. Google is currently developing its support for ARM chips and Android devices. Parker said, "AndroThe problem with ID phone is that we have never had a math coprocessor. ”

2 Target

The goal of GO is to improve the management of existing programming languages such as library dependencies (dependency), which are called repeatedly by applications. Because of the parallel programming pattern, this language is also designed to solve multiprocessor tasks. Google started developing go in about 2007 and invested in a full-time workforce in 2008. Google originally designed the language as a system programming language that could be used in Web servers, storage systems, and databases. But Google believes the language is also expected to be used in other areas.

3 Application

Because go is not yet mature, Google's app engine and other parts of the product have started to be written in the go language. That's why Google needs the help of external programmers. "We need better libraries and tools, and the open source community can help us a lot in these areas," Parker said. By creating a new programming language, Google will continue to expand all aspects of computing in order to promote development in these areas. It is also the motivation for Google to develop its Android operating system, Chrome browser and Chrome OS.

4 function

Google has great expectations for go. It is designed to give full play to the advantages of multi-core processor synchronization and multi-work, and to solve the problem of object-oriented programming. It has modern programming language features, such as garbage collection, to help programmers handle trivial but important memory management issues. Go is also very fast, almost as fast as C or C + + programs, and can be quickly produced. Go's website is built with go, but Google has bigger ambitions. The software is designed for building server software (such as Google's Gmail). Google believes that go can also be applied to other areas, including executing software in the browser, instead of the role of JavaScript. "It's at least a level higher in intensity than JavaScript," says Pike. Google has built its own Chrome browser, partly to speed up JavaScript and Web performance, and Google has fused its own technology, such as native Client and gears. Pike said that another network-related feature of Go is that servers and user-side devices, such as PCs or mobile phones, can share work. As a result, the Go service makes it easy to adapt to different user-side processing performance. Go also solves one of today's biggest challenges: multi-core processors. General computer programs are usually executed sequentially, one at a time, but multi-core processors are more suitable for multitasking. "We think we have enough support to improve the problem," Pike said. The Go team is looking for help. One important area is to improve the runtime library that go can use. This kind of library can provide many tools and functions to speed up the process of programming. The Go Library also includes many important design elements and supplies resources to handle the same work, garbage collection and other low-level chores. The go team also needs compiler assistance. Thompson has written some compilers for the 32-bit and 64-bit x86 processors, and ARM processors, and Taylor has written a go frontend for the GCC compiler. Despite Google's ambitions for go, the company understands that the plan is not a complete replacement for existing technology. "I don't think we can replace anything," Pike said. We're just creating another role in this field.

5 features

Simple fast safe parallel fun open source, memory management, array security, compile quickly

6 team members

thompson:1983 (Turing Award) and winner of the 1998 National Technology Awards (Nationally Medal of Technology). He and Dennis Ritchie are the creators of UNIX. Thompson also invented the B programming language, which later derived from the C language. Pike: Was a UNIX team at Bell Labs, and a member of the Plan 9 operating system program. He has worked with Thompson for many years and has been creating a widely used UTF-8 character encoding. Robert Griesemer: The hotspot compiler that helped make Java, and the Chrome browser's JavaScript engine V8. In addition, Plan 9 developer Russ Cox, Tseng improves the widely used Kaiyuan code compiler for GCC's Ian Taylor.

7 Brief History

In 2007, Google engineer Rob Pike, Ken Thompson and Robert Griesemer began to design a new language, the original prototype of the Go language. [1] on November 10, 2009, the Go language was released to the world in open source mode. [1] on March 16, 2011, the first stable (stable) version of the Go language was released r56. [2] March 28, 2012, the first official version of the Go Language Go1 released. [2] April 04, 2013, the first go-1.1beta1 beta release of the Go language. [3] on April 08, 2013, the go language's second go 1.1beta2 beta was released. [3] May 02, 2013, go language Go 1.1rc1 release. [4] May 07, 2013, go language Go 1.1rc2 release. [5] May 09, 2013, go language Go 1.1rc3 release. [6] May 13, 2013, go language Go 1.1 official release. [7] September 20, 2013, go language Go 1.2rc1 release. [8]

8 Support Platform

Hardware architecture

The go language design supports the mainstream 32-bit and 64-bit x86 platforms, while also supporting the 32-bit ARM architecture.

Operating system

The go language supports Windows, Apple Mac OS X, Linux and FreeBSD operating systems on the GO1 version. [9]

9 Development Tools

Liteide

Liteide is a cross-platform lightweight integrated development environment (IDE) developed specifically for the Go language, written by VISUALFC. liteide Main Features:
    1. support for mainstream operating systems Windowslinuxmacos X
    2. go compile Environment management and switch management and switch multiple go compilation environments support Go language cross-compilation
    3. Project Management method consistent with Go standard Gopath-based package browser based on the Gopath-based compiler system Gopath API document retrieval
    4. Go language editing support class browser and outline display Gocode (Code autocomplete tool) perfect support for Go language document viewing and API quick Retrieve code expression information display F1 source code definition Jump support F2GDB breakpoints and debugging support GOFMT automatic formatting support
    5. Other features Support for multi-language interface display full plug-in Architecture support editor color scheme based on Kate's syntax display support for full-text-based word auto-completion support keyboard shortcut binding scheme Markdown document editing supports live preview and synchronous display custom CSS display exportable HTML and PDF documents batch Conversion/ Merging into Html/pdf documents

Sublime Text

Sublime Text 2 (hereinafter referred to as Sublime) + gosublime + Gocode + Margo combination. Its AdvantagesYes:
    1. Automated prompt code.
    2. When you save it, the code is automatically formatted to make the code you write more beautiful and compliant with GO standards.
    3. Support Project Management
    4. Support syntax highlighting [10]

Vim

Vim is the development of a text editor from VI, code completion, compilation and error jumps and other convenient programming features are particularly rich, in the programmer is widely used.

Emacs

The legendary artifact of Emacs, she is not just an editor, it is an integrated environment, or it can be called an integration development environment, these features such as the user in the full-featured operating system.

Eclipse

Eclipse is also a very common development tool, and you can use eclipse to write go programs.

IntelliJ idea

Readers familiar with Java should be unfamiliar with idea, which is supported by a plugin to support the highlight syntax of the go language, code hints and refactoring implementations. [11]

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.