2 ms·
I don't buy it. That might be how every tool today works, but there's no reason V8 or whatever can't run TS the same way it runs JS.
by erhaetherth 3y ago
I don't buy it. That might be how every tool today works, but there's no reason V8 or whatever can't run TS the same way it runs JS.
- crabmusket 3y agoIf it runs TS "the same way" it runs JS then how is that different to what I described? It would be a JS engine that strips the types before execution. There is a persistent fantastical hope that TS can somehow be a compiled language. It can't, not without breaking compatibility with JS. Until, of course, someone manages to compile JS - but at that point TS would be irrelevant. I say this as someone who loves TS and wouldn't want to be without it: TS is a fancy linter. JS defines the execution semantics of the language.