Yesterday it became known that the search giant released the final version of the programming language Go 1, the announcement of which appeared in 2009. Download binary language distributions for Linux, FreeBSD, Mac OS and Windows
here . The language is released under the BSD license.
Go1, according to its development team, is “trying to combine the speed of developing dynamic languages, such as Python, with the performance and security of compiled languages, such as C or C ++.” For the sake of justice, one of Google’s engineers involved in the new language recognizes that the language ecosystem is still underdeveloped - there is no IDE and the set of supplied libraries is not very large, but, nevertheless, the company is actively working to improve the situation.
Go 1 contains compilers for x86 and for 64-bit platforms, there is also a Gccgo, based on the GNU GCC.
')
The sacramental "Hello, world!" On Go 1 looks like this:
package main import "fmt" func main() { fmt.Println("Hello, Habr!") }
An example is a bit more complicated - the calculation of a series of Fibonacci numbers.
package main func fib() func() int { a, b := 0, 1 return func() int { a, b = b, a+b return a } } func main() { f := fib() println(f(), f(), f(), f(), f()) }
[
Source ]