Google's In-House Programming Language Now Runs on Phones

Google's Go programming language, which allows services like Gmail to run across thousands of servers, is now targeting mobile devices.
WIRED

Google builds software in ways that software was never built before.

It builds software that runs across thousands of machines, spread across a worldwide network of computer data centers---a setup that allows it to serve information quickly to millions across the globe, from Search to Gmail to Maps. And it builds this software at an enormously rapid pace, dedicating enormous numbers of coders to each project, the only way to keep pace with the ever-evolving technological landscape.

Building such software involves all sorts of new programing tools, including, well, a new programming language. This language is called Go. "We realized that the kind of software we build at Google is not always served well by the languages we had available," ex-Bell Labs researcher Rob Pike, one of the language's rather well known creators, told me in 2011. "[We] decided to make a language that would be very good for writing the kinds of programs we write at Google."

Released as an experimental language in 2009, Go now helps drive the massive services running inside Google. Its influence is also expanding well beyond the company, mainly as a way of building "cloud" services as Google does. It's at the forefront of a new breed of languages that can rapidly execute code across a large number of systems, while still allowing large teams of coders to build this code at speed. This also includes languages such D, used at Facebook, and Rust, developed at Mozilla, the organization behind the Firefox web browser.

On Wednesday, Google released a new version of Go. Equipped with a revamped "garbage collector"---a way for programs to automatically clean unused code from machine memory---it's even more efficient than previous versions, says Russ Cox, one the project's leading engineers. But what's most interesting is that the language can now run on various ARM processors, the sort of chips that typically drive our smartphones.

Smartphones: Many Machines in One

That may seem like a very different environment from the enormous data centers that underpin Google's web services. Indeed, some question whether Go is really suited for phones. But the changes to Go represents a broader change in the phones we use. Much like the services that run inside data centers, the software on our phones is becoming more complex. It's evolving at a faster speed. It's built by much larger teams of coders. "It turns out that modern mobile apps involve significant computation and networking logic that runs on the mobile device itself," Cox says.

Today, we need new languages for building Google-like internet services. And as time goes on, we'll also need new language for building smartphone software. Apple is building a new language called Swift for the iPhone, hoping to streamline the process in its own way And now, Google is exploring the use of Go on both Apple and Android devices.

Robert Zanotto, an Italian coder who works with Go, says this effort is a long way from fruition. But it's something he'd like to see. And it's certainly where the world is moving. It's not just that phone hardware is evolving. It's that, as more and more people adopt smartphones, we may need to execute more and more of the code on the phone itself. We may need to reduce the burden on the data center.

One of the big strengths of Go is "concurrency." It runs well across many machines. With the rise of multi-core processors, our individual phones are behaving more and more like collections of machines. As Cox says, "There's a good analogy there."