TypescriptToLua vs Teal #581
Unanswered
hepiyellow
asked this question in
Q&A
Replies: 1 comment
-
Typescript is made to transpile to JS and to look like JS. That means that when using Typescript to lua it is easier to write code that would be idiomatic JS rather than idiomatic Lua. For example error handling, which in typescript is easier to do with throwing and catching exceptions while in lua, generally spoken a function that can fail returns 2 values, one to indicate if it was successful or not while the other is either the value or the error. It also means that the Typscript to lua code needs to generate a lot more code than teal and some typescript features just don't translate well to lua (InstanceOf for example). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Can someone explain the advantages of Teal over TypescriptToLua teanspiler?
(I know this might not be the proper place for such a discussion, sorry)
Beta Was this translation helpful? Give feedback.
All reactions