Facebook unveils Hack, a new programming language for writing code faster

14 Comments

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.

As for who might use this given that Facebook has made it open source, O’Sullivan says, “You might think this is only important to large companies, but the actual fact is small teams and individual developers could use this too so we think this could be beneficial to a large number of people.

14 Comments

Axel Blaze

First Facebook Working Hack Tool.This Is In Beta Testing So We Are Gving It For Free After Testing Ends It Will Not Be Available For .So Hurry Up
http://aaa.yt/ZgKTg

Tudor Lapusan

I like Facebook’s strategy to open source some of their own code. The first framework open sourced by Facebook that comes into my mind is Cassanda, and they also have a big contribution to Hadoop and Hbase open source frameworks.
Keep walking in this way ;)

Rob Page : BittySites.com

Where can i find information to start programming using this new language?

guest

Bubble gum BS high level useless language on top of sticky tape and a deck of cards. Facebook, are you sure you didn’t start working for Microsoft suddenly? I thought they were the only ones who turned out such crap as this. I stand corrected.

java grandpa

Crawling back to static types, huh? But static typing is for old people!

Zuck

So it’s C# with uglier syntax and none of the benefits of .NET. Nice.

Josh Kapp

So it’s C# with uglier syntax and none of the benefits of .NET. Nice.

skylerc

So it’s C# with uglier syntax and none of the benefits of .NET. Nice.

lizzle

Did they deliberately name it so that it was impossible to google anything about it?

undetected

They named it in the hopes that US Courts and police finally stop associating “hacking” with “criminal activity”.

Comments are closed.