Monday, July 26, 2010
Creators of two dozen new programming languages--some designed to enable powerful new Web applications and mobile devices--presented their work last week in Portland, OR. The reason for the gathering was the first Emerging Languages Camp at the O'Reilly Open Source Convention.
The designers included hobbyists eager to flex their development muscles, academics hoping to influence the next generation of computing, and researchers from corporations like Microsoft and Google who want new tools to address evolving applications and infrastructure.
In dense 20-minute presentations, designers shared details of their embryonic languages. What all the designers had in common was a desire to shed decades-old programming conventions that seem increasingly ill-suited to modern computing--a desire shared by the tech industry at large. "There's a renaissance in language design at the moment," says Rob Pike, an engineer at Google and codesigner of Go, a programming language being developed at the company. "And the biggest reason for it is that the existing mainstream languages just aren't solving the problems people want solved."
One of those problems, of great interest to large enterprises like Google as well as Facebook and Amazon, is how to manage the exploding complexity of distributed, multicore computing platforms like data centers and cloud networks. Google's Go language was unveiled in late 2009 for this purpose as an alternative to C++, which, according to Pike, does not allow programmers to easily take advantage of modern parallel computing architecture. "C++, which is the main systems language at Google and a lot of other places, is essentially 20 years old now," Pike says. "Many of the things we understand now about hardware and networking--and how they're changing software design ideas--haven't had a chance to affect the design of that language."
On Google's scale, Pike and his teammates found that C++ limited productivity by taking minutes or hours to compile. (Compiling is the process in which human-readable source code is batch-translated into binary "machine language" that a computer's CPU can execute). Go reduces redundancies in the compiling process, which means that "programs can be ready to execute in a matter of seconds," says Pike. Pike doesn't think that Go will push aside C++ as a dominant language; "we just thought it needed some competition," he says, but adds that Go is already being used on "real projects" internally at Google.
Another evolving area of computing concerns programs running on mobile devices linked in "ad hoc" wireless networks. AmbientTalk, an experimental language presented by Tom Van Cutsem from Vrije Universiteit Brussel in Belgium, explores a new paradigm called "ambient-oriented programming," which departs from traditional distributed computing in two main ways. First, it does not rely on central infrastructure. Second, it assumes that network connections are volatile and unpredictable (as is usually the case with mobile devices passing in and out of range with each other). According to Van Cutsem, "AmbientTalk is smart enough to buffer messages so that when the connection drops, they're not lost, and when the connection is restored, it sends the messages through as if nothing happened."
In one experimental AmbientTalk application, two smart phones can wirelessly exchange metadata about each other's music libraries and provide song recommendations to each user. If one user walks out of range during this synchronization process, the application won't crash or hang. Other languages can provide this functionality as well, but with AmbientTalk, "this behavior of expecting and accepting network disruption is built into the language by default," says Van Cutsem. "This lets you make these applications without extra programming effort."
Kodu, a language presented by Matt MacLaurin of Microsoft's FUSE Labs, addresses a problem on the opposite end of the spectrum: how to get young people interested in programming in the first place. "Our working theory is that programming is intrinsically fascinating and fun, like crosswords or sudoku," says MacLaurin. "We're trying to change the cultural perception of what programming is, starting with kids."
Kodu is a free "visual programming language" for Xbox 360 and Windows PCs that introduces programming concepts in a video-game format. Instead of using abstractions like variables and strings in textual interface, Kodu offers a 3-D gaming backdrop populated with animated characters who can be scripted (via an Xbox game controller or a keyboard and mouse) to perform easily understandable actions--like eating apples or battling enemies. But those objects and actions all map directly to "real" programming concepts, making Kodu a complete language capable of implementing sophisticated logic. "We've gotten great validation from some of the language theorists at Microsoft," MacLaurin says. "The real success is that kids can pick it up without a computer science teacher in the room, and build stuff with it that we didn't anticipate."
Pike, Van Cutsem, and MacLaurin all agree that specialized programming languages will become increasingly important in coming decades. But that doesn't necessarily mean that new languages will push aside old ones to become newly dominant.
Alex Payne, a former engineer at Twitter (and now chief product and technology officer for BankSimple, a personal finance startup), who organized the Emerging Languages Camp, says that "polyglot programming" is much more likely to become the norm, with programmers becoming fluent in many different languages that are optimized for different problems. "It's going to be a Tower of Babel from here on out," he said. "But I don't necessarily think that's a bad thing."