You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
true it could result in more performance (except python lol) but afaik these languages don't have similar libs as I'm currently using (babel, isolated-vm, codemod matcher), and implementing them from scratch would be too much effort to be worth it
#23
Closed
moongazer07 opened this issue
Nov 9, 2023
· 2 comments
true it could result in more performance (except python lol) but afaik these languages don't have similar libs as I'm currently using (babel, isolated-vm, codemod matcher), and implementing them from scratch would be too much effort to be worth it
swc is probably the closest thing to babel but still too limited:
Very, very tricky --- Javascript is a heavily dynamic language where pretty much everything can be changed at run time: object properties, functions, types, etc.
As such it maps very badly onto C. Any Javascript translator would have to be able to cope with such things, which means it would have to translate the Javascript into machine code at run-time - which makes it a JIT, which we're already using.
So a transpiler that supported every js feature would still be slower overall.
https://www.assemblyscript.org is very similar to js/ts but would also require rewriting or substantially modifying all libs, in which case using another language is most likely a better choice
swc is probably the closest thing to babel but still too limited:
webcrack relies heavily on this kind of stuff
Originally posted by @j4k0xb in #22 (comment)
you could also transpile the libs if possible
The text was updated successfully, but these errors were encountered: