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

How this compares to TypeScript? At the quick glance I noted:

- more powerful type system (union types, hurray)

- support for JSX

- no windows binaries

- supports more of ES6 stuff

- ...but has no support for modules yet

- no generics (??)

How about performance? and workflow? Didn't yet find this: does it use a normal "write then compile" model like TS or has something like Hack (if I'm not mistaken it has a daemon running in the background, checking the code as you write it).

Wonder why FB decided to roll this on instead of using TS.




Some comments on that:

- Has other comments have said: TypeScript is getting (already in master branch) union types.

- Support for JSX isn't really a huge deal.

- Windows support will probably come - it's an open source library. I hope it's not the OCAML tooling.

You make some great points about generics and using their own type system instead of TS, especially since TS has investments from both Microsoft and Google (with AtScript which supersets it).

They state they use a model like Hack - and the repo also looks this way but I'm also curious, it looks like a very peculiar choice.



There is no real compile time step with respect to type checking. Flow (like Hack) analyzes and type checks in the background, realtime.

For workflow, check out: http://flowtype.org/docs/getting-started.html#_


>...but has no support for modules yet

I see some mentions of import in the tests and the grammar: https://github.com/facebook/flow/search?utf8=%E2%9C%93&q=imp...




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

Search: