I have only read small bits of flow online but it looks like it's just re-inventing TypeScript. The only innovative aspect I see is null checks (which is huge), but everywhere else it does the same or less.
underlying the design of Flow is the assumption that most JavaScript code is implicitly statically typed
... Flow infers those types automatically wherever possible
... developers can check their code for type errors without having to explicitly annotate that code with types.
This makes Flow fundamentally different than existing JavaScript type systems (such as TypeScript), which make the weaker assumption that most JavaScript code is dynamically typed, and that it is up to the developer to express which code may be amenable to static typing. In general, such a design leads to reduced coverage: Fewer type errors are caught, and tools are less effective. While this is a reasonable choice for some code, in general such a design does not provide as many benefits as it could without significant additional effort.
It also doesn't use static typing. It uses structural typing. There is a big difference and that's what makes it map so well on top of a dynamic language.
Flow still sounds like it's reinventing the wheel.
15
u/CookieOfFortune Mar 16 '16
Well, I've been transitioning to React and Typescript so... hopefully I'm betting on the right fads?