A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.wired.com/2014/07/d-programming-language/ below:

The Next Big Programming Language You've Never Heard Of

Andrei Alexandrescu didn't stand much of a chance. And neither did Walter Bright.

When the two men met for beers at a Seattle bar in 2005, each was in the midst of building a new programming language, trying to remake the way the world creates and runs its computer software. That's something pretty close to a hopeless task, as Bright knew all too well. "Most languages never go anywhere," he told Alexandrescu that night. "Your language may have interesting ideas. But it's never going to succeed."

Alexandrescu, a graduate student at the time, could've said the same thing to Bright, an engineer who had left the venerable software maker Symantec a few years earlier. People are constantly creating new programming languages, but because the software world is already saturated with so many if them, the new ones rarely get used by more than a handful of coders---especially if they're built by an ex-Symantec engineer without the backing of a big-name outfit. But Bright's new language, known as D, was much further along than the one Alexandrescu was working on, dubbed Enki, and Bright said they'd both be better off if Alexandrescu dumped Enki and rolled his ideas into D. Alexandrescu didn't much like D, but he agreed. "I think it was the beer," he now says.

Andrei Alexandrescu. Photo: Ariel Zambelich/WIREDPhoto: Ariel Zambelich/WIRED

The result is a programming language that just might defy the odds. Nine years after that night in Seattle, a $200-million startup has used D to build its entire online operation, and thanks to Alexandrescu, one of biggest names on the internet is now exploring the new language as well. Today, Alexandrescu is a research scientist at Facebook, where he and a team of coders are using D to refashion small parts of the company's massive operation. Bright, too, has collaborated with Facebook on this experimental software, as an outsider contractor. The tech giant isn't an official sponsor of the language---something Alexandrescu is quick to tell you---but Facebook believes in D enough to keep him working on it full-time, and the company is at least considering the possibility of using D in lieu of C++, the venerable language that drives the systems at the heart of so many leading web services.

C++ is an extremely fast language---meaning software built with it runs at high speed---and it provides great control over your code. But it's not as easy to use as languages like Python, Ruby, and PHP. In other words, it doesn't let coders build software as quickly. D seeks to bridge that gap, offering the performance of C++ while making things more convenient for programmers.

Among the giants of tech, this is an increasingly common goal. Google's Go programming language aims for a similar balance of power and simplicity, as does the Swift language that Apple recently unveiled. In the past, the programming world was split in two: the fast languages and the simpler modern languages. But now, these two worlds are coming together. "D is similar to C++, but better," says Brad Anderson, a longtime C++ programmer from Utah who has been using D as well. "It's high performance, but it's expressive. You can get a lot done without very much code."

>In the past, the programming world was split in two: the fast languages and the simpler modern languages. But now, these two worlds are coming together.

In fact, Facebook is working to bridge this gap with not one but two languages. As it tinkers with D, the company has already revamped much of its online empire with a new language called Hack, which, in its own way, combines speed with simplicity. While using Hack to build the front-end of its service---the webpages you see when you open the service in your web browser---Facebook is experimenting with D on the back-end, the systems that serve as the engine of its social network.

But Alexandrescu will also tell you that programmers can use D to build anything, including the front-end of a web service. The language is so simple, he says, you can even use it for quick-and-dirty programming scripts. "You want to write a 50-line script? Sure, go for it." This is what Bright strove for---a language suitable for all situations. Today, he says, people so often build their online services with multiple languages---a simpler language for the front and a more powerful language for the back. The goal should be a single language that does it all. "Having a single language suitable for both the front and the back would be a lot more productive for programmers," Bright says. "D aims to be that language."

The Cape of a Superhero

When Alexandrescu discusses his years of work on D, he talks about wearing the "cape of a superhero"---being part of a swashbuckling effort to make the software world better. That's not said with arrogance. Alexandrescu, whose conversations reveal a wonderfully self-deprecating sense of humor, will also tell you he "wasn't a very good" programming language researcher at the University of Washington---so bad he switched his graduate studies to machine learning. The superhero bit is just a product of his rather contagious enthusiasm for the D project.

For years, he worked on the language only on the side. "It was sort of a free-time activity, in however much free-time a person in grad school can have, which is like negative," says Alexandrescu, a Romanian who immigrated to the States in the late '90s. Bright says the two of them would meet in coffee shops across Seattle to argue the ins and outs of the language. The collaboration was fruitful, he explains, because they were so different. Alexandrescu was an academic, and Bright was an engineer. "We came at the same problems from opposite directions. That's what made the language great--the yin and the yang of these two different viewpoints of how the language should be put together."

For Alexandrescu, D is unique. It's not just that it combines speed and simplicity. It also has what he calls "modeling power." It lets coders more easily create models of stuff we deal with in the real world, including everything from bank accounts and stock exchanges to automative sensors and spark plugs. D, he says, doesn't espouse a particular approach to modeling. It allows the programmer "to mix and match a variety of techniques to best fit the problem."

>That's what made the language great--the yin and the yang of these two different viewpoints of how the language should be put together.

He ended up writing the book on D. But when he joined Facebook in 2009, it remained a side project. His primary research involved machine learning. Then, somewhere along the way, the company agreed to put him on language full-time. "It was better," he says, "to do the caped-superhero-at-night thing during the daytime."

For Facebook, this is still a research project. But the company has hosted the past two D conferences---most recently in May---and together with various Facebook colleagues, Alexandrescu has used D to rebuild two select pieces of Facebook software. They rebuilt the Facebook "linter," known as Flint, a means of identifying errors in other Facebook software, and they fashioned a new Facebook "preprocessor," dubbed Warp, which helps generate the company's core code.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3