Wednesday, July 11, 2012

Go Programming Language

Go is an open source project developed by a team at Google.  See the example of Fibonacci Closure below:

package main
// fib returns a function that returns
// successive Fibonacci numbers.
func fib() func() int {
 a, b := 0, 1
 return func() int {
  a, b = b, a+b
  return a
 }
}


func main() {
 f := fib()
 // Function calls are evaluated left-to-right.
 println(f(), f(), f(), f(), f())
}

Go is available @ http://golang.org/#
There are 2 books on it:
and

Version 1.0 of the language was released in late March 2012 and binary distributions are available for Linux, FreeBSD, OS X and Windows. The language is open source and BSD-licensed.

No comments:

Post a Comment