Engineers turn an academic exercise into a battle-tested reality with their new language Hack.
Bryan O’Sullivan, Julien Verlaguet, and Alok Menghrajani, three engineers from Facebook, have developed a new open-source version of PHP that could take the programming world by storm. It offers the speed and flexibility of PHP, as well as the safety of more static languages like Java. The best thing about ‘Hack‘ is that it’s already being used to run the gargantuan social network that is Facebook.
PHP and Hack are extremely similar, but the difference is that PHP requires much more server space compared with other programming languages, especially as websites start to grow. Facebook engineers first solved the server problem by running all its PHP code on a new piece of software called the Hip Hop Virtual Machine (HHVM). Hack is the final piece in the puzzle, and makes it easier for developers to manage code and eliminate errors.
The programming language combines flexibility and speed with safety, which until now has only been an academic exercise known as gradual typing. “You edit a file and you reload a webpage and you immediately get the feedback of: Here’s what the page looks like after I made that change. There is no delay,” explains O’Sullivan. “You get both safety and speed.”
Some argue if the language is actually ‘new’ because it’s so similar to PHP, but there’s no doubt it makes it possible to do something that wasn’t even an option before.