Why Asana Is Switching to TypeScript
eng.asana.com
eng.asana.com
It's actually "gradual typing", which among many benefits shared with full static typing has one very important of its own: it gets out of your way when you want to ignore the types. The approach itself is old(EDIT: Common Lisp and Dylan), the research and theory behind it is a decade old at this point, this shouldn't be very surprising anymore :)
The only language that I've seen in JS land that is trying to get this right is AtScript from the Angular team.
https://docs.google.com/document/d/11YUzC-1d0V1-Q3V0fQ7KSit9...
Looks interesting so far.
Edit: Quote from the doc you linked: "This runtime type system is modeled after Dart’s runtime type assertion. Dart users working on large scale applications point out that optional types and runtime type assertions work well in practice."
So, while a system like TypeScript that checks types in the code is fantastic, it doesn't check types in the input, which is how a lot of problems happen in the first place.
Seriously, just import one legacy dataset into your system or have to work with some JSON api, and all of a sudden you can't trust that the data is valid, correctly typed, or even sane.
Doing proper validation of types and data integrity at any input point can save you a whole category of sadly common bugs. That includes data coming out of any data source you use, like a database.
Runtime type checking is another tool to make validated data a common, sane thing.
Strong boundaries allow for potentially better code reuse, fewer bugs, and a more confident style. Once you setup a type or validation boundary, you know that you no longer need to check for type errors and so forth elsewhere in the code, if only for the fact that the code will blow up before it even gets there.
That means you write less code, have fewer bugs, and can spend more time doing important things, like playing Quake 2.
It doesn't get much hype because it's not new, but that's why I like it. Reliable and stable.
[1] http://disnetdev.com/contracts.js/
[EDIT: Contracts.js is based off Racket, advantages pointed out by another commenter.]