Statically typed JavaScript via Microsoft TypeScript, Facebook Flow and Google AtScript
Update 2014-11-18: Facebook Flow has been released as open source. Its website is flowtype.org . The site mentions plans for Flow’s future . This blog post looks at three initiatives for adding static typing to JavaScript: Microsoft’s TypeScript, Facebook’s Flow and Google’s AtScript. Typing Let’s first clarify some terminology related to typing (excerpted from “ Speaking JavaScript ”). Static versus dynamic In the context of language semantics and type systems, static usually means “at compile time” or “without running a program,” while dynamic means “at runtime.” Static typing versus dynamic typing In a statically typed language, variables, parameters, and members of objects (JavaScript calls them properties) have types that the compiler knows at compile time. The compiler can use that information to perform type checks and to optimize the compiled code. Even in statically typed languages, a variable also has a dynamic type, the type of the variable’s value at a given point at run...