3 ms·
There are quite a few differences from the old "JScript" days. First of all: TypeScript is liberally licensed open source. JScript was totally proprietary. An
by dangoor 11y ago
There are quite a few differences from the old "JScript" days.
First of all: TypeScript is liberally licensed open source. JScript was totally proprietary.
Another aspect is that TypeScript is seeking to be a strict superset of JavaScript that evolves as JavaScript does (something that wasn't really happening in the JScript days) and is focused on specifically providing static types and tooling for types in JS. It's not a general "embrace, extend, extinguish" kind of thing at all, but rather a very targeted tool.
TypeScript is really one of the most JavaScript-y languages that compile to JS. Most of the compile-to-JS languages are more radical divergences from JS.
JS is not going to be replaced (though WebAssembly[1] will likely become an additional compile target), but compile-to-JS is going to continue to grow in popularity. Already, many people are compiling future-JS to present-day-JS.
The browser vendors have found that the standards evolve best when people can actually write code against the standards before the standards are hardened. Compile-to-JS tools help with that. If optional static types and type inference become very popular via TypeScript and Flow, JS itself may evolve to support those features and then we'll have that standard.
Microsoft is a better player on the web today than they have ever been before.
[1]: https://github.com/WebAssembly/design https://github.com/WebAssembly/design
- spion 11y ago> TypeScript is really one of the most JavaScript-y languages that compile to JS. Most of the compile-to-JS languages are more radical divergences from JS. This is what I've been trying to get across for a while, thanks for the wording. Even CoffeeScript is a much bigger divergence than TypeScript (not only in syntax but in semantics, e.g. scope)