Hacker News new | ask | show | jobs
by cpprototypes 3657 days ago
Does anyone know if the ECMAScript group is seriously considering adding something like TS? Maybe in ES8 or ES9? TS 2 will be impressive and it seems TS has a lot of momentum (such as Angular 2).
3 comments

Brendan Eich made the following comment here a while back but I don't know if what he hoped for had made any progress:

" Indeed we had structural types in ES4 toward the end, and almost bluffed MS into folding (I'm told by a reliable source). But ES4 was trying for too much too soon. At this point we really need to see ES6/7 and TypeScript + Flow "gene- culture co-evolution". As I said at the last TC39 meeting on the topic, big de-facto standard wins trump rushed de-jure standards any day. /be"

and also:

" Type system implementors and the JS stewards must communicate well for this to win. It's looking good so far, on Ecma TC39: JQuery, Facebook, Netflix, PayPal (Ebay originally, and again), Twitter all represented along with Apple, Google, Microsoft, and Mozilla. Also academic researchers from various universities, all of whom love type systems and theory :-)."

https://news.ycombinator.com/item?id=8906807

Would be nice, but I think we can do much better than what TS gives us right now, on the level of the type system. What's really missing are ADTs / sum types (and pattern matching, though that is more an implementation detail).
I agree, ADTs would be nice. In fact, we have a pull request out for it right now. [1] :)

[1]: https://github.com/Microsoft/TypeScript/pull/9163

Speaking of Angular 2, will we have to wait until Angular v3 for it to use TypeScript v2?