Write a Blog >>

Flow is a static type checker for JavaScript that is in heavy use at Facebook. Flow’s design carefully balances the dual needs of precision and speed: its powerful flow analysis helps it understand idiomatic patterns in modern JavaScript, whereas its parallel and incremental architecture provides the illusion of near-instantaneous type checking. While this design has served us well over the past three years, new challenges and opportunities have forced us to rethink some core parts of the design. This talk will focus on two new directions. One direction is scaling. With our ever-growing repositories, we cannot simply scale gracefully with overall code size: we have to instead scale with the size of the diffs of a single developer. This in turn has led to a complete re-architecture of Flow towards “lazy” type checking, where the type checker initializes by computing just the dependency information among files, and then grows the set of files that are analyzed as files are changed. Another direction is soundness. As Flow continues to cover increasing percentage of our codebase, a natural question to ask is whether we can use types for optimizing our code. Flow’s types are optional and are not backed by runtime checks. We have been exploring a system of “trusted” types where types that may not be sound are marked as such so that an optimizing compiler can either validate such types with runtime checks or avoid optimizing based on such types.

Mon 19 Jun
Times are displayed in time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change

10:30 - 12:50: Monday - 10:30 - 12:50 - AuditoriumCurry On Talks at Auditorium, Vertex Building
10:30 - 11:10
Talk
Curry On Talks
11:20 - 12:00
Talk
Curry On Talks
12:10 - 12:50
Talk
Curry On Talks