Our website is made possible by displaying online advertisements to our visitors.
Please consider supporting us by disabling your ad blocker.

Responsive image


Hack (programming language)

Hack
Hack logo, featuring white lowercase "hack" letters on a black background, with stylized triangular geometric shapes on the left
Designed byJulien Verlaguet, Alok Menghrajani, Drew Paroski, and others[1]
DeveloperMeta Platforms
First appeared2014
Stable release
4.172 Edit this on Wikidata / 2 November 2022 (2 November 2022)
Typing disciplineStatic, dynamic, weak, gradual
OSCross-platform
LicenseMIT License[2]
Websitehacklang.org
Influenced by
PHP, OCaml, Java, C#, Scala, Haskell

Hack is a programming language for the HipHop Virtual Machine (HHVM), created by Meta (formerly Facebook) as a dialect of PHP. The language implementation is open-source, licensed under the MIT License.[2][3][4]

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.[5] Hack's 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.[3][6]

  1. ^ Bryan O'Sullivan (2014-03-28). "Where Credit Belongs for Hack". Archived from the original on 2021-03-01. Retrieved 2019-02-06.
  2. ^ a b "facebook/hhvm: hhvm / hphp / hack / LICENSE". github.com. Meta Platforms. 2018-04-11. Archived from the original on 2019-01-07. Retrieved 2019-02-06.
  3. ^ a b Josh Lockhart (2014-04-03). "Facebook's Hack, HHVM, and the future of PHP". O'Reilly Media. Archived from the original on 2019-01-07. Retrieved 2019-02-06.
  4. ^ Cade Metz (2014-03-20). "Facebook Introduces 'Hack,' the Programming Language of the Future". Wired. Archived from the original on 2014-03-28. Retrieved 2019-02-06.
  5. ^ Aseem Rastogi; Avik Chaudhuri; Basil Hosmer (January 2012). "The Ins and Outs of Gradual Type Inference" (PDF). Association for Computing Machinery (ACM). Archived (PDF) from the original on 2017-08-12. Retrieved 2019-02-06.
  6. ^ "Hack Manual: Hack and HHVM – Type Annotations". docs.hhvm.com. Archived from the original on 2018-08-02. Retrieved 2019-02-06.

Previous Page Next Page