Back

ⓘ Hack (programming language)




Hack (programming language)
                                     

ⓘ Hack (programming language)

Hack is a programming language for the HipHop Virtual Machine, created by Facebook as a dialect of PHP. The language implementation is open-source, licensed under the MIT License.

Hack allows programmers to use both dynamic typing and static typing. This kind of a type system is called gradual typing, which is also implemented in other programming languages such as ActionScript. Hacks type system allows types to be specified for function arguments, function return values, and class properties; however, types of local variables are always inferred and cannot be specified.

                                     

1. History

Hack was introduced on March 20, 2014. Before the announcement of the new programming language, Facebook had already implemented the code and "battle tested" it on a large portion of its web site.

                                     

2. Features

Hack is designed to interoperate seamlessly with PHP, which is a widely used open-source scripting language that has a focus on web development and can be embedded into HTML. A majority of valid PHP scripts are also valid in Hack; however, numerous less frequently used PHP features and language constructs are not supported in Hack.

Hack extends the type hinting available in PHP 5 through the introduction of static typing, by adding new type hints for example, for scalar types such as integer or string, as well as by extending the use of type hints for example, for class properties or function return values. However, types of local variables cannot be specified. Since Hack uses a gradual typing system, in the default mode, type annotations are not mandatory even in places they cannot be inferred; the type system will assume the author is correct and admit the code. However, a "strict" mode is available which requires such annotations, and thus enforces fully sound code.

                                     
  • into computers and computer networks Hack programming language a programming language developed by Facebook Hack typeface an open source typeface
  • software art, as a hacking interface to another language particularly functional programming or procedural programming languages or as a joke. The
  • Arc is a programming language a dialect of the language Lisp, developed by Paul Graham and Robert Morris. It is free and open - source software released
  • the Hack programming language and used to support PHP execution before the release of HHVM version 4. By using the principle of JIT compilation, Hack code
  • A low - level programming language is a programming language that provides little or no abstraction from a computer s instruction set architecture - commands
  • such as programming or other media in a spirit of playfulness and exploration is termed hacking However, the defining characteristic of a hacker is not
  • is a programming language developed in the late 1970s at the Xerox Palo Alto Research Center in Palo Alto, California, United States. The language name
  • implementation The Unified Modeling Language UML supports a kind of attribute named Stereotypes. The Hack programming language supports attributes. Attributes
  • Shakespeare Programming Language SPL is an esoteric programming language designed by Jon Åslund and Karl Hasselstrom. Like the Chef programming language it