Do we need Flow and TypeScript

(Stoke Master Jack) #1

Do the benefits of whatever differentiates FlowType from TypeScript outweigh the downsides of having two competing standards?

(Alexei) #2

I think yes. Flow requires less effort for project migration.
When in our project we decide to have the type system, Flow wins with the really great advantage you don’t need to rewrite your project. In our case, we have the pretty large code base in pure js and fixing all ts warning costs too much for us.

BUT, personally, I think that TS is better(IDE support, bigger community, better typings, and is more flexible). And for new projects, I believe TS is a good decision.

And I agree that having this 2 standards is bad. :pensive:

P.S. Also I want to mention that for me personally Flow community looks really weak.

(Mark Volkmann) #3

Don’t forget the benefit of having two products that push each other to improve. A recent example is TypeScript adding the strictNullCheck option which is what Flow does by default. It’s unclear that TypeScript would have ever done that without proponents of Flow making the case that the lack of that was a downside to TypeScript.

(Daniel Earwicker) #4

There is much value in having a proliferation of variant languages that work as experiments. They will influence TS positively.

There is very little danger of this causing serious confusion over which standard to go with, simply because TS has such a huge lead by every metric, making it the only sensible mainstream choice: almost every article about static typing in JS is an article about TS. But this does not devalue any other similar languages at all from the perspective of research - it just means they are very unlikely to go mainstream.

TS is improving so fast that the distinguishing features of Flow are disappearing rapidly. For example, you can set a couple of options and TS 2.3 will type check your .js files and grab extra type info from your doc comments, making migration much easier in a Flow-like way.

Also if you wanted to influence TS and so get an enhancement into the mainstream to have the widest possible impact on users, you’d be better off forking TS as a starting point rather than Flow.

(Joetidee) #5

Why do you even need these technologies ?

(Stoke Master Jack) #6

Do you mean, why do need type checking in JavaScript? That is a much larger discussion.