Hacker News new | ask | show | jobs
by d1plo1d 3708 days ago
Personally, I'm more excited about Flow because it introduces a modern type system into ES6/ESNext without me having to sacrifice Babel.

With regards to types: TypeScript has only recently added support for any kind of Algebraic Data Types whereas Flow was built upon Unions and Intersections from day one. That to me speaks to their priorities.

2 comments

Unions were added in TS 1.4, over a year ago.

https://blogs.msdn.microsoft.com/typescript/2015/01/16/annou...

Also, Intersections were added in TS 1.6, last year:

https://blogs.msdn.microsoft.com/typescript/2015/09/16/annou...

They seem to be moving at a decent, agile pace to improving/expanding upon the algebraic sides of the type system.

Yup, I was definitely wrong on that one. Sorry about that.

Thank you for correcting me.

Next up on the roadmap, Typescript is working to add opt-in strict null and undefined checking which is probably the last area where Flow's type system is particularly better than Typescript's.

(It will be opt-in as Typescript follows a rule of increasing strictness via compile options to support the spectrum of JS needs, but also as it will not be entirely backward compatible with existing type definition files and will need some effort among typings authors.)

The fact that Flow doesn't work on Windows is a big limitation.

I prefer the idea of Flow as well but tooling and community is not there yet

There are occasionally Windows builds by the OCamlPro people popping up.

The fact that last time I checked, it wasn't able to consume TSD signatures from third-party libraries (or offer an equivalent system with a significant amount of libraries) is a much bigger issue IMHO.

Not terribly related but I am starting to see this as a pattern on the internet:

When I bring up the latest and greatest (eg. Flow) it doesn't actually work on Windows because Windows is as I see it an after-thought for a lot of the Open Source world.

But I've brought up this exact problem (the lag in tooling) to .Net/Windows devs before and they've told me I'm wrong and that they've got all the latest and greatest dev tooling like everyone else.