Why Anders Hejlsberg is Full of Shit
or why TypeScript is yet another steaming pile of crap that does nothing to advance the state of the art...
Go ahead, watch the video and come back. It's ok I'll wait...
- optional parameters on functions
- ambient typing - aka monkey patch typing
So what never mind we've been down these roads before, not all of them are bad, but many could be remedied by just conforming to the existing proposals for ES Harmony. For example:
Which leaves their type hackery onto existing code as obvious footnote in the history of bad ideas, as trying to force a 3rd party application to conform to an ad hoc specification of what one thinks it might do to be a generally bad idea.
- Organizing Programs Without Classes - describing how to structure programs with prototype base inheritance ca. 1991
- Typestate-Oriented Programming - dynamic interfaces which change with the state of the underlying FSM
- Brendan Eich's "Harmony of my Dreams" - on why he's no longer convinced opt-in static typing would benefit developers
And you have to realize here that, Eich explicitly points out the flaw in TypeScript's "ambient typing":
For Typed JS along the lines of Typed Racket, we would need not only modules but contracts. That is not yet proposed, but it could happen for a later Harmonious edition than ES.next (ES6, unless something needs that number in a hurry).