Wednesday, March 26, 2014

Facebook Introduces ‘Hack,’ the Programming Language of the Future

image credit: Jon Snyder/WIRED
Facebook engineers Bryan O’Sullivan, Julien Verlaguet, and Alok Menghrajani spent the last few years building a programming language unlike any other.
Working alongside a handful of others inside the social networking giant, they fashioned a language that lets programmers build complex websites and other software at great speed while still ensuring that their software code is precisely organized and relatively free of flaws — a combination that few of today’s languages even approach. In typical Facebook fashion, the new language is called Hack, and it already drives almost all of the company’s website — a site that serves more than 1.2 billion people across the globe.
“We can say with complete assurance that this has been as battle-tested as it can possibly be,” says O’Sullivan, a veteran of iconic tech companies Sun Microsystems and Linden Lab who has long played an important role in a popular language called Haskell.
O’Sullivan and company publicly revealed their new language this morning, and at the same time, they “open sourced” it, sharing the technology with the world at large and encouraging others not only to use it, but to help improve it.
The software world is littered with programming languages, and new ones appear all the time. But according to some who have used it or who know the past work of those who built it, Hack has a design and a pedigree that immediately set it apart. “If Bryan O’Sullivan built it,” says programming guru David Pollak, who only yesterday heard about the new language, “I would walk across hot coals to use it.”

In the Beginning

When Mark Zuckerberg started work on Facebook in late 2003 — a moment recreated to such great effect in the Hollywood film The Social Network — he used a programming language called PHP. It was one of the most popular web languages of the day — a language that let you build and rebuild sites with extreme speed. PHP is what’s called a dynamically typed language. Basically, this means you needn’t take the time to define specific parameters for each and every routine in your code, and once you finish a piece of code, you can almost instantly run it — without taking additional time to compile it into another form. The code essentially compiles in the background, as you write it.
For the next decade, Zuckerberg and his rapidly growing company continued to build their site with PHP. It suited “The Hacker Way,” the Zuckerberg coding philosophy that encourages engineers to constantly look for ways of improving the technology at hand. But eventually, as Facebook expanded to hundreds of millions of people, the language started to show its limitations. As a PHP site grows, you need far more computer servers to run the thing than you would with other languages, and it can be difficult to manage all your code and keep it free of bugs.
At a certain size, you’re better off with statically typed languages such as Java, where you’re required to carefully define your variable types. You can’t move as fast with these languages — you have to compile code before running it — but you need fewer servers to run your code, and in the long run, it’s easier to manage what you’ve built.
 More details: Wired

No comments:

Post a Comment