Announcing a Specification for Hack
Today we are excited to announce the availability of the initial specification for the Hack programming language.
When we announced Hack, we were very excited for the community to get their hands on a programming language that has helped Facebook engineers become more productive in their day-to-day development and became, alongside PHP, the language used when developing applications running on HHVM. At the time of release, we had documentation geared for the programmer using Hack to develop applications. However, we did not have official documentation for those that might want to create a Hack implementation of their own or something like a Hack conformance test-suite. This specification fills that gap. It is the document for the Hack implementer, and an excellent supplemental document for the Hack user.
Hack’s roots are from PHP. Last year, we announced the development of a specification for PHP. The fine folks at the PHP Project have since taken over control of that specification and have shepherded it on GitHub to the tune of hundreds of commits, over 100 pull requests and many general improvements. It was very important, and extremely helpful, that we had a PHP specification when creating the Hack specification. You will see many similarities between the two specifications, along with many new features and differences.
We are hosting the new Hack specification on GitHub. We are eager for you to explore the specification, provide us feedback and pull requests. Given that Hack is still a relatively new language, we will continue to evolve the specification with new features. We encourage you to ping us with comments on direction, possible feature requests, etc – check out the links in the sidebar to the right to see how to get involved.
Special thanks must be given to Rex Jaeschke, who, as with the PHP specification, led the actual writing. In addition, Julien Verlaguet, Josh Watzman, Eugene Letuchy, Fred Emmott, Sara Golemon, and Drew Paroski helped ensure the specification’s accuracy. And, of course, sincere thanks to the community that has used Hack since its inception, providing invaluable input and feedback.
- Miles Johnson: This is fantastic. Thanks a lot for all the hard work guys!
- Paul M: Yeah definitely. You guys keep doing what you are doing :)
- Clement Wong: Why is Hack not subnet of PHP like asm.js of JS?
- Fred: Amazing, this will help to spread Hack even more and it deserves it. Hack is already so much better than PHP!
- Joel Marcey: Hack is neither a subset or a superset of PHP. You can view it as a dialect of PHP, with roots from the language but with added features (and some features removed).
- Links 20/2/2015: Android Studio v1.1, GDB 7.9 | Techrights: […] Announcing a Specification for Hack […]
- Clement Wong: Hi Joel, But couldn't it be made as a subnet from the beginning like what Mozilla did to asm.js? (assuming the main reason of creating hack-lang is to avoid type checking as far as I understood?)
- Joel Marcey: Hi Clement, Are you asking whether Hack can be a subnet as in domain subnet? Like hack.php.com or something? Or are you asking if Hack can be made a subset of PHP? If the former, Hack and PHP are two different projects. They are worked on by different teams. If subset, then I explained that below as Hack is not really a strict subset of PHP. It is both a subset and superset in ways --- i.e., we call it a dialect. And a main reason we created Hack was not to avoid type-checking, but to enable quick, reliable type checking. :)
- PHP Annotated Monthly – March 2015 | JetBrains PhpStorm Blog: […] talk about Hack and HHVM: the first one got a new initial specification, as well as PHP a few months ago. Hack developers produced a specification for the language […]