Join top executives in San Francisco on July 11-12, to hear how leaders are integrating and optimizing AI investments for success. Learn More

At Facebook, the codebase that runs the social networking site is written in Hack.

The Menlo Park, Calif.-based social networking titan said it had streamlined PHP, made it better, and that Hack was now the official language running the site used by 1.2 billion users. Facebook engineers embellished the code internally and announced the upgrade Thursday, according to a post.

Facebook did not post the update to its site, but the beta version is now live and can be seen here.

Company engineers said inherent challenges in the PHP code sometimes made simple tasks “tricky or cumbersome” and that coding errors were sometimes not detected until the script had gone live. Hack has changed that, Facebook said.  Thus, the company said, “Hack was born.”

Facebook explained that one of the major embellishments to PHP thus:

“Our principal addition is static typing. We have developed a system to annotate function signatures and class members with type information; our type checking algorithm (the type checker) infers the rest. Type checking is incremental, such that even in the same file, some code can be converted to Hack while the rest remains PHP. Technically speaking, Hack is a gradually typed language: dynamically typed code interoperates seamlessly with statically typed code.”

“The Hack adds additional features beyond static type checking, including collections, lambda expressions, and run time enforcement of return and additional parameter types….We are delighted to open-source both Hack and the tools that we used to convert our codebase (”

Facebook is hosting a Hack-related event at its campus next month. Believe us — we’ll have more soon.

VentureBeat's mission is to be a digital town square for technical decision-makers to gain knowledge about transformative enterprise technology and transact. Discover our Briefings.