Re:Node.js adds experimental support for TypeScript
by seanmcdirmid on Thursday July 25, 2024 @02:28AM
(#41065340)
Typescript’s optional and unsound type system also does nothing for a JIT beyond what it could already do for JavaScript, you can’t do optimization if your types are unreliable. However, I really really like how Typescript’s type system super charges developer productivity (type errors via the compiler and feedback via the IDE), and don’t mind this part of the design at all.
Re:Node.js adds experimental support for TypeScript
by teaearlgraycold on Thursday July 25, 2024 @03:02AM
(#41065570)
You can use typescript types to compile functions. You just might need to deoptimize when you actually hit the function.
Re:Node.js adds experimental support for TypeScript
by seanmcdirmid on Thursday July 25, 2024 @11:58PM
(#41075668)
I don’t know if Vortex-style compilation ever worked in practice.
Java was literally the thing that made the term "JIT" popular, so I really don't know what you were going for here.
Also I just can't see how Typescript is in any way "closer" to Java - it's incredibly different IMHO. The only thing they have in common is probably the "Javascript" misnomer and the fact both support imperative programming, but that's it.