Hacker News new | ask | show | jobs
by paavohtl 3355 days ago
Do you have any examples to back up your claims? I don't think Flow's type system is more advanced than TypeScript's (which is not Java-like in any way).

What do you mean by "abstract types"? TS's type system is based around structural interfaces, so you're almost always working with non-concrete types.

It also supports discriminated unions, and you can emulate nominal typing with abstract tag properties.

https://www.typescriptlang.org/docs/handbook/advanced-types.... https://basarat.gitbooks.io/typescript/docs/tips/nominalTypi...