FaceBook has discharged a programming language called Hack for HHVM (HipHop Virtual Machine). Hack is intended to empower programming designers to program intelligent web pages quicker and even more viably by staying away from framework slamming mistakes. FaceBook is discharging it as an open-source language to support far-reaching use as well as to rapidly spot lapses in Hack itself, and to expand upon the language to provide for it more quality and gimmicks.
Notwithstanding bringing about a significant improvement place with an alternate programming language, FaceBook has a corporate enthusiasm for discharging Hack. Engineers who work in one organization’s system have a tendency to oblige alternate objectives of that organization, regardless of the fact that its structure is open source. Numerous intuitive sites as of now connection to FaceBook for things like client sign-ups.
The principle and most essential peculiarity is static writing: approximately technique marks and variables sorts are lapse prawns stuff in dynamic languages, for example, PHP, so finding the best approach to appreciate this statically wrote languages characteristic into Hack looked an incredible thought.
Some of the features as per displayed on http://hacklang.org/ are listed below-
Type Annotations allow PHP code to be explicitly typed on parameters, class member variables and return values.
Generics allow classes and methods to be parameterized (i.e., a type associated when a class is instantiated or a method is called) in the same vein as statically type languages like C# and Java.
Nullable Types are supported by Hack through use of the ? Operator. This introduces a safer way to deal with nulls and is very useful for primitive types that do not generally allow null as one of their values, such as bool and int (using? bool and ?int respectively). The operator can be used on any type or class.
Collections enhance the experience of working with PHP arrays, by providing first class, built-in parameterized types such as Vector (an ordered, index-based list), Map (an ordered dictionary), Set (a list of unique values), and Pair (an index-based collection of exactly two elements).
Lambdas offer similar functionality to PHP closures, but they capture variables from the enclosing function body implicitly and are less verbose
Hack is a big leap forward in the world of developing error free, dynamic and effective WebPages. However, with many other languages out there in the market, we have to wait and see where it leads. The way Hack has covered the market, the future surely looks bright, but still it is too early to tell. It does not support Windows Operating Systems, and other flaws like this would be revealed in due time. For now, we have to see how they cope with the flaws and what else FaceBook have in store.