3 ms·
"If you end goal is to statically type your whole application then flow has little or no advantages" does not somehow translate to: If your end goal is to /not/
by tuxracer 9y ago
"If you end goal is to statically type your whole application then flow has little or no advantages" does not somehow translate to: If your end goal is to /not/ statically type your whole application then typescript has a disadvantage. Both TypeScript and Flow are gradually typed and annotations are completely optional at every step of the way. Neither TypeScript nor Flow differ whatsoever in this regard.
- lewisl9029 9y agoHmm... did I somehow misinterpret this statement from the GP? > The important distinction is that if you tell typescript a function can take in any value it makes no attempt to type check. Flow will look at each usage of the function and try to determine if the value being run through is valid. This reads to me to mean that while annotations are optional in both systems, if you don't provide them for a particular subsystem in TypeScript, the static analysis will simply perform no checks for usages of that particular subsystem, while in Flow it will still attempt to validate your subsystem with properties it can infer on a best-effort basis from things like the way its functions are called.
- Joeri 9y agoTypescript also tries to infer types, and falls back to an implicit "any" type when it can't. Flow was better at type inference, but I don't know if it still is.