About Hack

Hack is a programming language for the HipHop Virtual Machine(HHVM).Hack is created by facebook. It was introduced on March 20, 2014. Hack reconciles the fast development cycle of a dynamically typed language with the discipline provided by static typing, while many features commonly found in other modern languages.

Hack language implementation is open source. Hack was inspired by PHP, C#, and Java so it brings the features of these languages together itself to form a single language with syntax very close to php.

Syntax of hack

Main difference between hack and php is unlike php hack doesnot mix with html code. To generate hack either XHP or template engine is required. Hack allows types to be specified for function arguments and function return values. Function in hack are thus annotated with types like the following.

History

Facebook engineers Bryan O’Sullivan, Julien Verlaguet, and Alok Menghrajani spent the last few years building a programming language unlike any other.

Working alongside a handful of others inside the social networking giant, they fashioned a language that lets programmers build complex websites and other software at great speed while still ensuring that their software code is precisely organized and relatively free of flaws — a combination that few of today’s languages even approach. In typical Facebook fashion, the new language is called Hack, and it already drives almost all of the company’s website — a site that serves more than 1.2 billion people across the globe.