6 ms·
> Flow, introduced 3 months after TypeScript Do you think Flow was built in 3 months as a reaction to Typescript? Not that it was a big enough problem that two
by mambodog 10y ago
> Flow, introduced 3 months after TypeScript
Do you think Flow was built in 3 months as a reaction to Typescript? Not that it was a big enough problem that two different groups of people independently decided to try to solve it?
EDIT: disregard this, Flow was introduced much longer than 3 months after TypeScript. The blog post introducing Flow mentions TypeScript, and is probably worth reading for background [1]
> Nuclide instead of Atom/Sublime/VSCode
Nuclide is an Atom plugin.
> Jest instead of Jasmine/Mocha
Jest provides a superset of Jasmine functionality, and uses Jasmine as its test runner.
[1] https://code.facebook.com/posts/1505962329687926/flow-a-new-static-type-checker-for-javascript/ https://code.facebook.com/posts/1505962329687926/flow-a-new-...
- bcherny 10y ago> Do you think Flow was built in 3 months as a reaction to Typescript? They probably knew that TS was in progress when they started, but I don't have a window into that. I did ask some Flow devs a few weeks ago if they are interested in merging with TS, and they answered with a categorical no.
- mambodog 10y agoI can't speak for either project, but personally I would say that I don't think static typing in JS is a solved problem, and at this stage to me it seems a monoculture would be much less fruitful than a competition of ideas.
- bcherny 10y agoI would agree if they were at all different, but they seem to be syntactically and functionally identical. As a caveat, I am a daily TS user, and have only played around with Flow.
- pluma 10y agoI am not a computer scientist, but I have heard people repeatedly argue that Flow sets out to create a "sound type system" which TS intentionally does not. What this means in practice I don't fully understand but it seems to result in enough architectural differences that it apparently makes sense to have both despite the superficial similarities in syntax and behaviour.
- mlsarecmg 10y agoI think the issue is that TS is non-modular and dictates javascripts reach. It behaves like no other tool and blocks others from working. Take something like React/Redux for instance, which are built around modern day javascript, but if you transpile any example on the official Redux page right now you will see TS bail out because it can't understand some of the syntax. Flow on the other hand solves one problem and solves it well. It behaves as any other tool would.
- bcherny 10y agoNot sure I understand. Can you give a concrete example?
- mlsarecmg 10y agoYou can only do as much as TS allows you to, unless you route through babel in a second pass. TS is a tool that controls to which extend you can use language features that are drafted. They do pick drafts here and there, but others they omitt, object spread for instance which is very common for Redux. As i said, try to transpile this in TS: http://redux.js.org/docs/basics/ExampleTodoList.html http://redux.js.org/docs/basics/ExampleTodoList.html This is why they made Flow.
- bcherny 10y agoStill not sure I understand. All the code in that link is valid TS - TS is just a superset of JS. Object spread is not part of the ES7 spec. It is a proposal which has not made it to stage 3 yet, and might still be dropped. That said, there is a TS issue tracking adding support for it: https://github.com/Microsoft/TypeScript/issues/2103 https://github.com/Microsoft/TypeScript/issues/2103.
- RyanCavanaugh 10y agoTypeScript was released October 1, 2012. Flow was released November 18, 2014 Did Flow take 2 years to get implemented? I didn't think the initial release looked like a project that had 2 years of dev time on it.
- mambodog 10y agoWhoops, my mistake. I don't know enough about the history of Flow to comment further.
- deleted 10y ago[deleted]