LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - News (https://www.linuxquestions.org/questions/linux-news-59/)
-   -   Facebook unveils Hack, a new Open Source programming language for writing code faster (https://www.linuxquestions.org/questions/linux-news-59/facebook-unveils-hack-a-new-open-source-programming-language-for-writing-code-faster-4175498884/)

jeremy 03-20-2014 12:58 PM

Facebook unveils Hack, a new Open Source programming language for writing code faster
 
Quote:

Facebook is at it again, introducing a new programming language designed to make the process of writing and testing code faster. Called Hack, it has been in use for a year at the social networking company, and on Thursday Facebook released it as open source.

Hack is a programming language that Facebook developed to combine elements of static-type programming languages such as C with dynamic-type languages like PHP. When you code in a static programming language it will let you know when you have an error before the program runs, but in the more modern, dynamic type language you code until the program crashes. Facebook is a PHP house, but Bryan O’Sullivan, manager of the Hack team, said that with many developers working on a variety of projects, the benefits of being able to catch errors before running the program began to make sense. It let developers code faster, which may be just as important as writing code that runs faster when you ship as much code as Facebook.

From the Facebook blog post:

Traditionally, dynamically typed languages allow for rapid development but sacrifice the ability to catch errors early and introspect code quickly, particularly on larger codebases. Conversely, statically typed languages provide more of a safety net, but often at the cost of quick iteration. We believed there had to be a sweet spot.

Thus, Hack was born. We believe that it offers the best of both dynamically typed and statically typed languages, and that it will be valuable to projects of all sizes.


So, in typical Facebook fashion a couple of engineers got together to build what O’Sullivan called a gradual-type language that became Hack. Facebook has been running Hack for a year alongside PHP and plans to gradually migrate as much of its new code as possible to Hack. O’Sullivan said Hack has no affect on how fast the code runs.
More at Gigaom...

--jeremy


All times are GMT -5. The time now is 06:16 PM.