> And the only reason to make that step optional, is to not run it, which is a worse experience.
Yeah, but it's an optional "worse" experience.
IOW, for those people who think it's a better experience (because there is no build step), they can opt into it. For those who think it's a worse experience, they can continue using a build-step.
Nothing changes for those who want a build-step.
(I agree about the standards process thing)
> Performance improvements enabled by optimisations would be nice, but I believe I heard that no major gains would be expected there, especially compared to something like WASM.
If TS is compiled in the browser, then it can be compiled to WASM, not to JS.
It's only when TS is compiled on the server that it has to be compiled to JS.
If the browser support TS natively, the compilation target would not be JS (which is what makes the resulting code slow), but either WASM, or naive code.
> a better experience (because there is no build step)
I feel like the way to make both of us happy is to just strip type annotations, rather than doing full type checking in the browser. Which, luckily, is already making its way through the standards track: https://tc39.es/proposal-type-annotations/
> If the browser support TS natively, the compilation target would not be JS (which is what makes the resulting code slow), but either WASM, or naive code.
I was not talking about compiling it to JS; I seem to recall that native support wouldn't necessarily result in big performance improvements. (Consider that JS is also not being compiled to JS.)
Yeah, but it's an optional "worse" experience.
IOW, for those people who think it's a better experience (because there is no build step), they can opt into it. For those who think it's a worse experience, they can continue using a build-step.
Nothing changes for those who want a build-step.
(I agree about the standards process thing)
> Performance improvements enabled by optimisations would be nice, but I believe I heard that no major gains would be expected there, especially compared to something like WASM.
If TS is compiled in the browser, then it can be compiled to WASM, not to JS.
It's only when TS is compiled on the server that it has to be compiled to JS.
If the browser support TS natively, the compilation target would not be JS (which is what makes the resulting code slow), but either WASM, or naive code.