Hacker News new | past | comments | ask | show | jobs | submit login

> One question I have is why did you prefer Typescript over flow?

I don't want to start a holy war on this, as it's generally accepted that Flow's type system and inference is superior. I believe TypeScript is a generally better solution despite this, for other reasons. This is just the list I can come up with offhand:

Upsides for TypeScript:

* bigger community

* more definitions (This cannot be overstated; the gap is wide)

* great IDE tooling and support via language service

* great compiler

Downsides for Flow:

* less definitions

* smaller community

* .flowconfig is difficult to get right, and often requires hacks to pass type checking

* dodgy IDE support

* type discovery is more difficult




Thanks for this. I'm still relatively new to the Javascript world (mainly native developer) and I've only just started using flow.

Could you tell me a bit more about the following points:

* more definitions (This cannot be overstated; the gap is wide)

and

* great compiler

I'd love to hear more about this and or read some good articles comparing flow to typescript.


typescript wants to be in your project from day one

flow can be added to an existing project

i feel that almost everyone underestimates how important this is


This seems to be a common misconception. TypeScript can be added gradually as well with strict settings disabled, and supports JavaScript with a config setting. With Babel now supporting TypeScript[1], none of these arguments prevail.

[1]: https://www.npmjs.com/package/babel-preset-typescript




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: