Feb 16, 2021

ELI5: Hack - Programming Productivity Without Breaking Things

cover

By Dmitry Vinnik and Joe Previte

Originally posted here.

In this post, we explain Hack, a programming language focused on productivity and type safety, in a way that is super simple to understand (or, as it's commonly known online, ELI5). If you're interested in learning by watching or listening, check out a video about this open source project on our Facebook Open Source Youtube channel.

Why Hack?

Developers like to move quickly. We want the fast development cycle of dynamically typed languages. Sometimes, however, that means sacrificing safety features like static typing. What if you could have both? We challenged ourselves to see if we could build a programming language that answered that question.

At Facebook, we have thousands of engineers shipping code multiple times a day. We needed a programming language that could keep up with our fast pace. We built Hack, a programming language focused on increasing developer productivity while preventing them from breaking the codebase.



Watch the video

Hack provides engineers with quick feedback loops to develop faster while keeping safety in mind with static typing. The type checker can stay speedy by incrementally type-checking your files as you edit them. This functionality integrates into your workflow so seamlessly that you hardly notice. We built it specifically for HHVM, which is a high-performance runtime for your Hack applications. It's also open source and available on GitHub.

Where is it used?

Hack was open sourced in March 2014. Currently, it is heavily used at Facebook, and companies like Slack and Box also adopted Hack in their stack.

Where can I learn more?

To learn more about Hack, visit the website. It has excellent documentation for developers who are just starting and developers who want to use more advanced features. If you would like to see Hack in action, you can install it locally by following the Getting Started guide. If you have any questions, you can go to Hack's Facebook group or Hack's Twitter.

If you have any further questions about Hack, let us know on our YouTube channel or tweet at us.

About the ELI5 series

In a series of short videos (~1 min in length), one of our Developer Advocates on the Facebook Open Source team explains a Facebook open source project in a way that is easy to understand and use.

We will write an accompanying blog post (like the one you're reading right now) for each of these videos, which you can find on our YouTube channel.

To learn more about Facebook Open Source, visit our open source site, subscribe to our YouTube channel, or follow us on Twitter and Facebook.

Interested in working with open source at Facebook? Check out our open source-related job postings on our career page by taking this quick survey.