JavaScript
JavaScript (sometimes shortened to JS) is a lightweight, interpreted, object-oriented language with first-class functions, most known as the scripting language for Web pages, but also used in many non-browser environments.
Flow is a static type checker for JavaScript that we built at Facebook. The overall mission of Flow is to deliver an immersive coding experience for JavaScript...
flow is a static type checker for javascript that we built at facebook. the overall mission of flow is to deliver an immersive coding experience for javascript developers—a fast editrefresh cycle—even as the codebase evolves and grows. in engineering terms, we identify two concrete goals that are important to this mission: precision and speed. these goals pervasively drive the design and implementation.
precision
javascript bugs can have significant impact at facebook. developers want to find and fix as many bugs as they can by the time their code rolls out into production. so we must care about soundness. at the same time, we must also care about not reporting too many spurious errors, because a low signal/noise ratio implies a low fix rate.
in other words, we want flow’s analysis to be precise in practice—it must model essential characteristics of the language accurately enough to understand the difference between idiomatic code and unintentional mistakes.
speed
precision usually comes at the cost of speed. but while a precise analysis is desirable, most of the appeal of javascript is lost if we slow down the editrefresh cycle by making developers wait as we compile.
in other words, we must engineer flow’s analysis to be extremely fast—it must respond to code changes without noticeable delay, while still being precise enough in practice.
javascript javascript-development