'Go' Programming Language
Google Introduces 'Go' Programming Language
Go aims to provide the efficiency of a statically-typed compiled language with the ease of programming of a dynamic language.
Other goals include:
- Safety: type-safe and memory-safe.
- Good support for concurrency and communication.
- Efficient, latency-free garbage collection.
- High-speed compilation.
The Go programming language is an open source project to make programmers more productive. Go is expressive, clean, and efficient. Its concurrency mechanisms make it easy to write programs that get the most out of multicore and networked machines, . Go compiles quickly to machine code yet has the convenience of garbage collection and the power of run-time reflection. It's a fast, statically typed, compiled language that feels like a dynamically typed, interpreted language
Go offers an expressive type system, fast compilation, good performance, .The language has been under development for roughly two years. It started out as a 20 percent project-time that Google's engineers are given to use as they choose for undirected experimentation-and evolved into a serious full-time undertaking. Google is releasing the source code under the BSD license with the hope that a community will emerge around the new programming language and participate in the effort to make it a compelling choice for software development.
Some of Google's sample Go code reveals that the syntax is C-like conventional. There are functions, "for" loops, standard conditional expressions, and many other features that you'd expect to find in a C-like language. For example, there is a shorthand. function syntax that lets you use real closures. There are some, example from Google's documentation:
func sum(a []int) int { // returns an int
s := 0;
for i := 0; i < len(a); i++ {
s += a[i]
}
return s
}
The native Go compilers, called 6g and 8g (for 64-bit and x86), are designed to be extremely fast. generate more efficient code. I was initially a bit surprised that Google chose not to use the Low-Level Virtual Machine (LLVM) compiler framework-it has a lot of LLVM expertise internally and is using it extensively for their awesome optimization effort. Pike says that LLVM was considered during the early stages of the Go project, but its compile-time performance was judged to be inadequate.
Advantages::
- Go compiles very quickly.
- Go supports concurrency at the language level.
- Functions are first class objects in Go.
- Go has garbage collection.
- Strings and maps are built into the language.
Reference:
- www.golang.org
- www.wikipedia.com
- www.arstechnica.com
- http://blog.golang.org