Home > other >  The go
The go

Time:11-23

Go (also called Golang) is Google's Robert Griesemer, Rob Pike and Ken Thompson and development of a strong static type, the compiled language, the language syntax similar to C, but the function are: memory safety, GC (GC), structure form and CSP - style concurrent computing,


Chinese name Golang foreign names Golang
Programming languages belong to sex
abstract: Go (also called Golang) is a kind of strong static type developed by Google, compiled, and hair, and which has the function of the garbage collection programming language,
Robert Greg shi mo (Robert Griesemer), Robert parker (Rob Pike) and Ken Thompson (Ken Thompson) in September 2007 began to design the Go, Ian later Lance Taylor, Russ Cox to join the project, Go is based on the Inferno operating system, developed by the Go officially launched in November 2009, as open source projects, and on Linux and Mac OS X platform for the implementation, then add the Windows system implementation, in 2016, selected by TIOBE software evaluation company Go for "TIOBE language" of the year 2016, at present, the Go release every six months a secondary version (that is, from a.x upgrade to a.y)


Description: Go grammar is close to the C language, but for the variable declaration is different, Go to support recycling, east of the Go parallel model is, hall of communicating sequential process (CSP) as the foundation, take similar model including Occam and Limbo of other languages, but it also has the characteristics of Pi arithmetic, such as channel, in 1.8 open plug-in (plugins) support, which means that can dynamically loading part function from the Go now,
Compared with the c + +, Go do not include such as enumeration, exception handling, inheritance, generics, assert that virtual functions, and other functions, but increased the Slice (Slice), concurrent, pipelines, garbage collection, Interface level (Interface), and other features of language support, Go version 2.0 will support generics, to assert that the existence of a negative attitude, is also defended themselves do not provide types inherited,
Differs from Java, Go embedded in the associative array (Hashes) (also known as a hash table or dictionary (Dictionaries)), like a string type,

Writing style: there are several provisions in the Go, when does not match the following provisions compiler will produce errors,

1. Each end of the program does not need to write a semicolon (;) ,
2. The curly brace ({) will not be able to place a new line,
3. If judgment and for loop does not need with parentheses, cladding

Go also has a built-in gofmt tool that can automatically adjust the code redundant blank, variable name alignment, and transfer alignment space into the Tab,

CodePudding user response:

Don't copy others, who says curly braces ({) will not be able to put a new line, switch statements {can wrap, won't compile error, if not afraid program ambiguous words,
  • Related