News for hackers. Stuff that matters.
Re:TypeScript Is Surprisingly OK for Compilers by hibbelig on Friday August 18, 2023 @08:51AM (#37174942)
Your parent suggested to make changes to TS so that TS is no longer compatible with JS (in the sense you described). Once that happens, compiling to WASM instead of transpiling to JS is a very valid design choice.
Re:TypeScript Is Surprisingly OK for Compilers by wiseowise on Friday August 18, 2023 @12:20PM (#37177895)
The whole purpose of TS is better JS.
Re:TypeScript Is Surprisingly OK for Compilers by AgentME on Friday August 18, 2023 @11:09PM (#37185088)
That's fair, though there have been several projects that have attempted to be "JS-ish but with some behavior changes with strict type handling sprinkled in for optimizations" like the Strong types proposal (cancelled) and Dart (which switched to being a compile to JS language just like Typescript), so I'm currently convinced that the trade-offs aren't obviously worth it and that it's unlikely Typescript will change its priorities in that direction in the near future.