Hacker News new | ask | show | jobs
by agento 3148 days ago
I only post on HN about once a year. But I want to chime in on this topic.

At my current job we started a clean slate codebase (react/redux/webpack) beginning of 2016 and had everything typechecked by Flow from the start.

We found Flow to be extremely unreliable and cumbersome to use with not much apparent commitment behind it. As soon as Typescript hit 2.0 we converted the entire codebase (fairly easy to do since the syntax and semantics are very similar') and have been super happy with that decision.

I wholly agree on you remark about soundness vs. tooling. Flow tooling sucked, error messages were cryptic and unhelpful and we ran into obvious mistakes all the time that Flow did NOT catch, without being able to figure out why that was. Editor support was lacking and we just never trusted the typechecker.

Bolting on types to Javascript has tradeoffs and Microsoft did an amazing job of making the right tradeoffs.

There is noticeable effort and momentum behind the project that inspires a lot of confidence in the languages future. It has completely changed the way I write Javascript and I can't imagine going back to an untyped world.

That change was not in rock-solid confidence that TS catches all my errors (although it does a remarkably good job at that), but the sheer productivity improvement types enable (autocompletion, project-wide renaming, all that stuff users of Java or C# IDEs have available to them).