Google hopes to remake programming with Go

Google has high hopes for Go.
It’s designed to address some issues in getting software to take advantage of multicore processors that can perform multiple tasks in parallel. It has an approach to ease some of the pains of object-oriented programming. It has modern language features such as “garbage collection,” which helps programmers deal with mundane but important memory management issues. And it’s designed to be fast–nearly as fast as programs written in C or C++–and enable fast creation of programs in the first place.
“It seems it’s getting much harder to build software than it used to be,” even though computers are vastly faster than in the past, Pike said. “The process of software development doesn’t feel any better than it did a generation ago. We deliberately tried to make a language that focused in part on rapid development, that compiles really efficiently, and that expresses dependencies efficiently and precisely so the compilation process can be controlled well. I find it much more productive to work in.”
When it comes to the speed programs at which programs run, “Our target was to get as close as we could to C or C++,” Pike said. They’re reasonably close–programs run about 20 percent to 30 percent slower right now, he said.
The Go Web site itself is built with Go, but Google has broader ambitions. The software is designed to build server software–Google’s Gmail is one example of what it’s suited for. Google thinks that it could be good for other cases, including running software in a Web browser, a task JavaScript handles today.
“It’s at least an order of magnitude better than JavaScript,” Pike said. Note that Google built its own browser, Chrome, in part to speed JavaScript and Web performance, and that Google already is incorporating its technology such as Native Client and Gears.
Another nice Web-related feature in Go: tasks can be shared by servers and client devices such as PCs or mobile phones that use those services. That makes a service more easily adapted to different amounts of processing power for those clients, Pike said.
Making the most of multicore
Go also is designed to tackle one of today’s big challenges, multicore processors. Programs often work sequentially, moving through a task one step at a time, but multicore processors are better at handling many tasks in parallel.
Go is no magic bullet for the problem, but Pike is optimistic that it will help. “We think we have support sufficient to take a crack at it,” he said.
Specifically, Go uses a technology dating back to the 1960s called CSP, or communicating sequential processes, that handles interactions among a set of cooperating programs, Pike said. The technology made an appearance in programming languages such as Occom and Erlang, but it generally hasn’t been applied in systems programming.
“We don’t believe we’ve solved the multicore-programming problem,” Pike said. “But we think we’ve built an environment in which a certain class of problems can take advantage of the multicore architecture.”
The design also can apply, to some extent, to spreading tasks among multiple servers connected over a network, he added.

Leave a comment

Your email address will not be published.