Re:Are dynamic languages going to replace static languages? ...
by Lapsa on Wednesday August 04, 2021 @07:40AM
(#28059808)
With all due respect, in my book - TypeScript is mostly useless, vendor lock-in driven bunch of crap. INTELLISENSE111!!!11ELEVEN
Re:Are dynamic languages going to replace static languages? ...
by noduerme on Wednesday August 04, 2021 @07:54AM
(#28059906)
Wha. I still write everything in Eclipse. Neon. And tsc somewhere under v3, compiling back to es5 in some cases to support old safari. Works great for me... lovely language, and zero lock-in.
TypeScript, by design, does not produce nor introduce any "noisy defensive code": the point of TypeScript was that type-safety in JavaScript can be achieved without any runtime cost.
The only significant code-gen that TypeScript does do by itself is stuff relating to ECMAScript modules (e.g. wrapping and repackaging your TypeScript module for other module systems).
...with the exception of when you take a modern TypeScript compiler and specifically instruct it to target ES3 (lol) or perhaps some older variants of ES5 - at which point the code `tsc` generates is still so minimal you'll still need to bring-your-own polyfill/monkeypatch libraries. This is stuff like reimplementing the spread-operator or `for(of)`, and so on.