News for hackers. Stuff that matters.
Re:Functions and algorithms implemented purely with TypeScri... by taeric on Wednesday July 05, 2023 @12:23PM (#36602674)
This feels like an odd excuse moreso than a reason. Consider that most folks consider compiling software to go down to an assembly language. Which often has crazy semantics and intrinsics that many of us don't understand or know about.

I suspect what you mean is that they aren't just compiling down to JavaScript, but they are wanting to do so in a way that there is no foreign function interface (FFI) consideration for folks in either language. That is, largely to say, they don't want a Typescript runtime?

Re:Functions and algorithms implemented purely with TypeScri... by sk0g on Wednesday July 05, 2023 @07:55PM (#36608974)
Precisely, TypeScript only exists at compile time. Half their goals relate to this fact, which leads to constraints regarding what the language can achieve.

> 3. Impose no runtime overhead on emitted programs. > 4. Emit clean, idiomatic, recognizable JavaScript code. > 7. Preserve runtime behavior of all JavaScript code. > 8. Use a consistent, fully erasable, structural type system.

https://github.com/Microsoft/TypeScript/wiki/TypeScript-Desi...

Re:Functions and algorithms implemented purely with TypeScri... by taeric on Wednesday July 05, 2023 @10:24PM (#36610228)
I'm curious on reasons why not to build a new runtime. That it is hosted in javascript seems like something that shouldn't be that big of a deal.