by pansa2 · 2y ago · 0 comments
Both languages are fairly quirky - at least JavaScript’s quirks are widely-known. But how do the implementations compare in terms of API, robustness, portability, performance etc?
Also, I’m not aware of any static typing add-ons for Lua, but presumably it’s possible to use TypeScript with QuickJS?
I don't see why not, since TS compiles down to JS. The engine doesn't know or care about what kind of transformations the code went through before it was JS. You might need to be careful about compatibility, the QuickJS intro says 'Almost complete ES2023 support", so you'd have to avoid any unsupported features.
I'd not cal TypeScript an addon to JS. It's a language that transpiles to JS (and so does CoffeScript, Elm, etc. etc.)
There are many language projects that transpile to Lua:
https://github.com/hengestone/lua-languages?tab=readme-ov-fi...