Does the world need another programming language?

Rob Pike on how and why Google's new Go language was developed.

Rob Pike has certainly been places and done things. In the early 1980s, he worked with Brian Kernighan and Ken Thompson at Bell Labs, where he co-wrote “The Unix Programming Environment” with Kernighan and co-developed the UTF-8 character encoding standard with Thompson. Pike is now a principal engineer at Google, where he’s co-developed Go, a new programming language. Pike, who will discuss Go at next month’s OSCON convention, talks about Go’s development and the current state of programming languages in the following interview.

What were the motivations for creating Go?

Rob Pike

Rob Pike: A couple of years ago, several of us at Google became a little frustrated with the software development process, and particularly using C++ to write large server software. We found that the binaries tended to be much too big. They took too long to compile. And the language itself, which is pretty much the main system software language in the world right now, is a very old language. A lot of the ideas and changes in hardware that have come about in the last couple of decades haven’t had a chance to influence C++. So we sat down with a clean sheet of paper and tried to design a language that would solve the problems that we have: we need to build software quickly, have it run well on modern multi-core hardware and in a network environment, and be a pleasure to use.

Although we targeted Go for a particular kind of problem, it turned out to be a much more general and adaptable programming language than we had thought. So we’re using it for a lot of different things now. I think it might have an interesting future in any number of directions.

What’s it like to program in Go?

RP: Go has the feel of a dynamic language like Python or Ruby or JavaScript, but it has the performance and safety of a language like Java or C or C++. So you get the lightweight feel of a modern scripting dynamic language but the robustness and performance of a more old-fashioned language.

Does Go have a robust development environment?

OSCON -
Save 20%RP: We have an interesting set of tools now that play with the language. One of the standard libraries that comes with the distribution is a complete parser. So depending on how difficult the problem is, you can write your own tool and maybe a page of code with the existing libraries.

There’s tools that let you link in existing libraries. With large packages like OpenGL or something like that, you’re much better off just linking against existing ones. We can do that with our wrapper tool, and there’s SWIG support so we can link against C++. But the fundamental libraries are all written in Go.

There’s plug-ins for Eclipse and a couple of other environments. There needs to be more. We don’t have an IDE yet, although we have some ideas about ways to do them.

Does the world need another programming language?

RP: It’s an interesting time for languages because there are many new languages coming about. There was a burst of language development in the late ’60s and early ’70s and then things died down. That’s not to say there weren’t any new languages coming along, but language design didn’t seem to be a very profitable enterprise. But then in the last five to ten years, there’s been a renaissance. One of the reasons for that phenomenon, which is what I’m going to talk about at OSCON, is that the languages in common use today don’t seem to be answering the questions that people want answered. There are niches for new languages in areas that are not well-served by Java, C, C++, JavaScript, or even Python.

How does Google compare to Bell Labs?

RP: A lot has changed in both worlds. When I worked at Bell Labs, we were doing much more research-driven, publication-oriented stuff. To a large extent, the company did not understand open source. When I came to Google, it was a very different orientation. We were definitely a company trying to make things happen. And at least a little later, open source became a fundamental part of the corporate culture. So they’re very different in that regard.

As far as day-to-day work goes, I think they have a lot in common. They’re both exciting places to work and they have a lot of smart people. But culturally, there’s a difference between a telecommunications company and an Internet company. They’re fundamentally different things.

This interview was edited and condensed.

Related:


Rob Pike will discuss Go’s development at the OSCON conference (July 19-23 in Portland, Ore.) OSCON will also be the site of the first Emerging Languages Camp.

tags: , ,