Google has released the final version of the programming language Go 1

    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.

    The Go1 language, according to its development team, is “an attempt to combine the development speed of dynamic languages ​​like Python with the performance and security of compiled languages ​​like C or C ++.” In fairness, one of Google’s engineers working on the new language admits that the ecosystem of the language 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 Gccgo, based on the GNU GCC.

    Sacramental "Hello, world!" on Go 1 is as follows:
    package main
    import "fmt"
    func main() {
    	fmt.Println("Hello, Habr!")
    }
    


    An example is a bit more complicated - calculating 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 ]

    Also popular now: