Hack language

It seems that almost every big IT company needs to have their own programming language nowadays. It seems that every few months someone announces a new fad language, despite most of them them rarely bringing anything new to the table, or the new things they do bring not being significant enough to warrant switching from some other well-established one. Speaking of companies and their languages here here a list of few:

Google has several like Go and Dart.

Oracle has Java

IBM has history of several of it’s own and it is developing new ones.

Now Facebook has Hack

Some days ago Slashdot has following posting: Facebook Introduces Hack: Statically Typed PHP. Hack is a language almost like PHP, but adds many features commonly found in other modern programming languages. The principal addition is static typing: system to annotate function signatures and class members with type information.

Hack adds safety nets while avoiding slowing you down. The possibility to use static typing adds more ability to catch errors, especially on large applications (and Facebook has quite many large applications built on PHP). The type checking is incremental: you can convert parts of the program to use statistically typed Hack syntax, while other parts of the program can remains dynamically typed PHP. In fact, most PHP files should be already valid Hack files. Hack runs on HHVM and interoperates seamlessly with PHP. Backwards-compatibility has it’s good and bad sides, which anyone can figure out.

Facebook is releasing Hack as an open-source language, not just to encourage widespread use but to quickly spot errors in Hack itself, and to build upon the language to give it more strength and features. Facebook has already done pretty good real-word testing of Hack: it already drives almost all of the company’s website — a site that serves more than 1.2 billion people across the globe.

The Hack website has more details. There’s a fairly complete language manual, tools to infer types in PHP source and annotate the code, and source available under the PHP license.

There are already hundreds of programming languages, so one more certainly can’t hurt. And this one seems to have something new that was wanted by many PHP programmers. But one thing really bothers me: “Hack” as a language name? Really? I thinks the choice of the language name was a bad one. Did they consider at all how easily this will get confused? Or is this very clever marketing: The aim could be that everybody that searches “facebook hack” will get this as the first result. This has not happened yet.

1 Comment

Leave a Reply to that photobooth rocks Cancel reply

Your email address will not be published. Required fields are marked *

*

*