
"These latent errors can hide for a long time in a dynamically typed languages." "There are certain kinds of errors and crashes that can occur," if the programmer is not careful about what data is assigned to variables, O'Sullivan said. Though it takes extra work to implement, static typing prevents run-time errors occurring when the wrong data type is entered into the program, either by human input or some other computer function. In contrast, static typing requires the programmer to define the data type for each variable before that program is compiled or run. With dynamic typing, "there is no explicit information in the source code that describes what kind of information the program is dealing with," O'Sullivan said. Many of the newer Web-oriented programming languages, such as PHP and JavaScript, do not have static typing, hence they are referred to as dynamically typed languages. Hack is basically an extension of the PHP language with built-in static typing, a feature found in more traditional programming languages such as C/C++ and Java, O'Sullivan said.

HHVM is a virtual machine that compiles PHP, normally an interpreted language, into byte code, so it can run more quickly. Hack requires Facebook's HHVM (Hip Hop Virtual Machine) to run. Individuals would also benefit by using Hack, O'Sullivan said, both in terms of increasing performance of their websites and improving the overall quality of their code.


Miana lavaver head of programming for facebook programing software#
In creating Hack, Facebook took an approach that was similar to Microsoft's with TypeScript, which is basically a superset of JavaScript that, like Hack, adds static typing.īoth projects set out to strengthen a popular dynamic programming language so it can be more easily used by large software teams to design mission-critical applications.
