5 ms·
Feels like Typescript is building (or has built up?) more momentum than Flow.
by jasonallen 10y ago
Feels like Typescript is building (or has built up?) more momentum than Flow.
- treve 10y agoI don't think Typescript has ever not been bigger, but could be wrong here.
- Vekz 10y agoIts true and unfortunate. Typescript is the new Coffeescript. It splits the ecosystem. Flow is a progressive enhancement and improves the ecosystem. Typescript has had more push in the mindshare marketing from Microsoft.
- wereHamster 10y agoTypeScript doesn't split the community any more than Flow does. TypeScript remains very close to ES2016/2017, syntax-wise, with the only major difference being type annotations, but you have those with flow as well. Anybody who can read JavaScript can read TypeScript.
- thejameskyle 10y agoFlow tries to integrate with the existing ecosystem as much as possible. By taking advantage of Babel, ESLint, Atom, etc. With Flow you don't even have to opt-in to a new syntax. You can just use comments: function foo(val /* : boolean */) /* : string */ {} Using really powerful inference you can also write much fewer types. If you have well types libraries [you sometimes don't need types in your code at all](https://medium.com/@thejameskyle/flow-mapping-an-object-373d64c44592 https://medium.com/@thejameskyle/flow-mapping-an-object-373d...).
- josteink 10y ago> With Flow you don't even have to opt-in to a new syntax. You can just use comments: So you use a opt-in comment-based syntax instead of a opt-in non-comment based one for type-annotations. Hardly a big difference. > Using really powerful inference you can also write much fewer types I'm just going to assume you didn't know typescript does this too. Typescript is nice. You should give it a try once. You may end up surprised:)
- coltonv 10y agoComments don't change it from being valid javascript whatsoever.
- djmashko2 10y ago> By taking advantage of Babel, ESLint, Atom, etc. Doesn't TypeScript actually predate all of those tools? So that logic doesn't seem reasonable.
- plexicle 10y agoI'm having trouble remember when Flow was bigger than TS at any point?
- ggregoire 10y agoI see 2 main reasons: - TS has been released before Flow - TS has the support of the Angular community
- whatever_dude 10y agoI may be biased (use and really like TS) but I think it's not even a comparison in terms of popularity Google Trends https://www.google.com/trends/explore?date=all&q=%2Fm%2F0n50hxv,facebook%20flow%20%2B%20flow%20language%20%2B%20flowtype https://www.google.com/trends/explore?date=all&q=%2Fm%2F0n50... NPM Downloads https://npm-stat.com/charts.html?package=typescript&package=flow-bin&from=2015-01-01&to=2016-12-07 https://npm-stat.com/charts.html?package=typescript&package=...
- jiaweihli 10y agoVery early on, Typescript cleverly built up an ecosystem around community-supported type definitions for popular js libraries. This makes type-checking and integration for those libraries dead simple. 2 years later, Flow is _still_ lagging behind in this area. [1] I'm not certain, but I think this may be due to Typescript allowing for a external header-like file while Flow requires inline types. For this reason I believe, as many other commenters have noted, Typescript has nearly always been ahead of Flow in popularity. [1] https://github.com/facebook/flow/issues/7 https://github.com/facebook/flow/issues/7
- Noseshine 10y agoI don't understand what you mean by this may be due to Typescript allowing for a external header-like file while Flow requires inline types. Flow supports external declaration files. I use them all the time for 3rd party modules.
- jiaweihli 10y agoYou're right, this has been added recently and there's also now a community effort around 3rd party modules. [1] Though it looks like it didn't become active until after at least 03/2016 [2]. I mention this only because TypeScript has been active in this area since 10/2012 [3], which is in-line with the original intent of my comment - that Flow is over 2 years (closer to 3.5 years) behind in building this out. [1] https://github.com/flowtype/flow-typed https://github.com/flowtype/flow-typed [2] https://github.com/flowtype/flow-typed/graphs/contributors https://github.com/flowtype/flow-typed/graphs/contributors [3] https://github.com/DefinitelyTyped/DefinitelyTyped/graphs/contributors https://github.com/DefinitelyTyped/DefinitelyTyped/graphs/co...