3 ms·
Is anyone else excited by the TypeScript compiler? [pdf]
- andrewstuart 4y agoThe problem is it is limited to generating code for microcontrollers. Maybe one day TypeScript will compile to other platformn?
- rvz 4y ago> Maybe one day TypeScript will compile to other platformn? Should be possible, especially with the size and backing of Microsoft. Someone did something similar before in the open. [0] [0] https://github.com/ovr/StaticScript https://github.com/ovr/StaticScript
- armchairhacker 4y agoPaper is "Static TypeScript". How does this compare to AssemblyScript? It seems very similar. I would absolutely love for a subset of TypeScript with a sound type system. The issue with AssemblyScript is that it doesn't interface well with existing JavaScript and TypeScript libraries. You could do runtime-typechecking in/out of the Static TypeScript, but that may be expensive. Or you could try to compile existing TypeScript libraries to AssemblyScript, except you can't because there are notable differences like explicit number types. JavaScript and TypeScript's ecosystem and direct interface with the browser are what keep it alive vs WASM, I wish there was a language which kept those while at the same time not just silently allowing type errors.
- trinovantes 4y agoThis seems to be a very tiny subset of TS. To get the full language, you'd probably have to link with a libuv runtime. Would be interesting to see if Microsoft decides to pursue this in the future.
- Existenceblinks 4y agoNo. If it's a small subset, it would be better to create a simple lang instead. Except the purpose is to stay close to javascript-like, is it for general purpose? > user’s STS program is compiled to machine code in the browser Okay, that would be it.