In association with heise online

11 November 2009, 09:54

Google's Go - A new open source language

  • Twitter
  • Facebook
  • submit to slashdot
  • StumbleUpon
  • submit to reddit

Google has announced Go, a new, experimental, open source language which it says combines the development speed of dynamic languages such as Python with the performance and safety of a compiled language like C or C++. The new language has its roots in a discussion between Rob Pike , Ken Thompson and Robert Griesemer in 2007. Frustration with existing languages for systems programming drove them to consider what a new language, that addressed systems developers, would look like. By January 2008, Thompson had begun work on a compiler and since the middle of 2008, Go has become a full time project and has been taking contributions of ideas and code from within Google.

The language itself has pointers but no pointer arithmetic; instead it offers bounded slices for random access to memory. Go promotes the writing of systems as lightweight communicating processes called goroutines. The developers say that an application can be made up of thousands of goroutines, which are supported at the language level. Unicode support, garbage collection and run-time reflection are also included in the design of the Go language. The canonical Hello World program in Go looks like

package main
import "fmt"
func main() {
fmt.Printf("Hello, 世界\n")
}

The language already has two compilers, gccgo which uses a GCC back end, and a suite of architecture specific compilers, 6g for 64 bit x86 code and 8g for 32-bit x-86 code (the naming style for the compilers is inherited from Plan 9 ). The GCC based compiler is slower than the architecture specific compilers but currently generates more efficient code.

According to the developers, although the language was developed by Google as an experiment to fill the gap between system and application languages for use within Google, it is not yet ready for production use within Google. The language and compilers are distributed under a BSD-style licence and instructions for downloading and installing it are available on the Golang.org site, along with a simple tutorial, an advanced look at the language and FAQs on Go in general and Go's language design.

(djwm)

Print Version | Send by email | Permalink: http://h-online.com/-856106
 


  • July's Community Calendar





The H Open

The H Security

The H Developer

The H Internet Toolkit