// guess the programming language of the day

$ whois hack

Hack

first released in 2014 · by Julien Verlaguet, Alok Menghrajani, Drew Paroski

$ guessprog --inspect hack

year
2014
paradigm
multi paradigm
family
c like
memory
automatic gc
binding
gradual
safety
strong

HACK(7)

AUTHORS
Julien Verlaguet, Alok Menghrajani, Drew Paroski
HISTORY
Hack was created at Facebook and released publicly in 2014 as a dialect of PHP running on the HHVM virtual machine. Facebook's codebase was a huge amount of PHP, and Hack let engineers add static types gradually, file by file, without a rewrite. Its type checker, written in OCaml, runs as a background server that gives near-instant feedback. Hack added generics, collections, lambdas and async functions, and in 2018 HHVM dropped PHP support to focus on Hack alone.
USAGE
Hack is used mostly inside Meta, where it powers much of the web backend, plus a few other companies. Outside that circle it is a niche language with a small community.
SEE ALSO
Hack on Wikipedia ↗
$ cat shout.hack
use namespace HH\Lib\{Str, Vec};

function shout(vec<string> $words): vec<string> {
  return Vec\map($words, $w ==> Str\uppercase($w).'!');
}

<<__EntryPoint>>
function main(): void {
  $words = vec['hack', 'is', 'typed'];
  foreach (shout($words) as $word) {
    echo $word."\n";
  }
}