Google's Go |
One of the core philosophies of Google, and one of the reasons it has been so successful, is efficiency. It’s about both being as efficient as possible when serving search results and processing data and creating product that push the limits of efficiency for the user (as an example, Google’s trying to make communication more efficient with Google Wave).
Maybe that’s why we’re not surprised that Google is finally looking to tackle the underpinning code that runs the web. Today the search giant released Go, an open-source development language that Google believes will combine performance with speed, and one that the company probably hopes will reshape the development and software industries in its favor.
Go is based on the C programming family, one of the most widely used programming language trees in the world. However, the twist is that incorporates elements of Python (a preferred development language within Google) and the Pascal/Modula/Oberon family to make faster and more dynamic programs.
Why Did Google Make Its Own Language?
In its Go FAQ, Google explains the main motivations behind the project:
“No major systems language has emerged in over a decade, but over that time the computing landscape has changed tremendously. There are several trends:- Computers are enormously quicker but software development is not faster.- Dependency management is a big part of software development today but the “header files” of languages in the C tradition are antithetical to clean dependency analysis—and fast compilation.- There is a growing rebellion against cumbersome type systems like those of Java and C++, pushing people towards dynamically typed languages such as Python and JavaScript.- Some fundamental concepts such as garbage collection and parallel computation are not well supported by popular systems languages.- The emergence of multicore computers has generated worry and confusion.”
Go is …
… simple
package main import "fmt" func main() { fmt.Printf("Hello, 世界\n") }
Go has a small, simple feature set, making it easy to learn.
… fast
Go compilers produce fast code fast. Typical builds take a fraction of a second yet the resulting programs run nearly as quickly as comparable C or C++ code.
… concurrent
Go promotes writing systems and servers as sets of lightweight communicating processes, called goroutines, with strong support from the language. Run thousands of goroutines if you want—and say good-bye to stack overflows.
… safe
Go is type safe and memory safe. Go has pointers but no pointer arithmetic. For random access, use slices, which know their limits.
… fun
Go has fast builds, clean syntax, garbage collection, methods for any type, and run-time reflection. It feels like a dynamic language but has the speed and safety of a static language. It's a joy to use.
… open source
Summary: Google believes that the web and computing have changed dramatically in the last ten years, but the languages powering that computing have not. But when you get down to it, Google could benefit a great deal from not only having a more efficient programming language, but having one it designed being used in thousands web and software apps.
If you want to learn more, Google (as usual) has released a detailed, hour-long Google Tech Talk on the new language (embedded below). However, if you’re a developer and just want to get started, we suggest checking out the Go Tutorial and writing your first program.
No comments:
Post a Comment