3 ms·
I'm not sure this answers your question, but: I've been working with TS for the past couple of years but now I'm working on a Flow project. Flow doesn't even
by whatever_dude 10y ago
I'm not sure this answers your question, but:
I've been working with TS for the past couple of years but now I'm working on a Flow project.
Flow doesn't even compare. It falls short on many things TS would immediately flag, and just feels less thought-out (subjective I know). Tooling support is terrible and while not the language's fault, it means it just doesn't help you as much as it could. Using Flow basically becomes an afterthought, a part of your build step, while with TS it's much easier to have that integrated into your development flow (via your editor of choice).
And honestly, some of the decisions around the language just feel strange. Not knowing what kind of bool to use [0] is pretty emblematic of where it is going as a language.
To me Flow is just half-helping in a way that TS is fully devoted to.
[0] http://stackoverflow.com/questions/40618817/flow-bool-boolean-and-boolean http://stackoverflow.com/questions/40618817/flow-bool-boolea...
- damncabbage 10y ago> It falls short on many things TS would immediately flag I'm kind of curious what you've run into personally. Having a dependency without any type-defs get silently treated as `any` is my own beef, but I haven't hit much else yet. (Some type-defs' use for `any` also gets my goat, such as Promise's catch argument and some of the lodash functions, but I'm considering that a separate thing.) > And honestly, some of the decisions around the language just feel strange. Not knowing what kind of bool to use [0] is pretty emblematic of where it is going as a language. This is more an existing JS weirdness (`true`/`false` vs `Boolean()`); Flow doesn't mess with runtime semantics, only adding a layer that you check with then strip out. And TypeScript has the same thing: var a: boolean = new Boolean(1); // Produces: // NewTypering.ts(29,5): error TS2322: Type 'Boolean' is not assignable to type 'boolean'.
- DanRosenwasser 10y agoTypeScript's full error message on that last one is actually Type 'Boolean' is not assignable to type 'boolean'. 'boolean' is a primitive, but 'Boolean' is a wrapper object. Prefer using 'boolean' when possible.
- WorldMaker 10y ago«Having a dependency without any type-defs get silently treated as `any` is my own beef» You can add the compiler flag --noImplicitAny to get errors if you prefer.
- Fifer82 10y agoMy colleague put it less cordially. ".... at least if they use flow, they are bagging up their shite which is better than a open field of the stuff".