Closed hepiyellow closed 1 year ago
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).
Can someone explain the advantages of Teal over TypescriptToLua teanspiler?
(I know this might not be the proper place for such a discussion, sorry)