▲ | pansa2 3 days ago | |
How does Luau compare to Teal [0], which is described similarly as a "statically-typed dialect of Lua"? | ||
▲ | cardanome 3 days ago | parent | next [-] | |
Teal compiles teal files into plain Lua just like TS does for JS. So all the advantages and disadvantages apply. Luau is a backwards compatible superset of Lua that comes with it's own performance-tuned runtime. It offers more than just gradual typing. So they are very different things. You can use Teal in cases when you don't control the runtime. Like write a Love2d game or your neovim config in it. Anywhere where Lua runs, you can use teal. On the other hand Luau can offer superior developer experience because you don't have a separate compile step. They can do a lot more things that are impossible with teal as they have their own runtime and types do not get erased by compiling. | ||
▲ | Scaevolus 3 days ago | parent | prev | next [-] | |
Teal transpiles to Lua, but Luau is a fork of Lua. Luau can implement wider ranging changes, like improving interpreter performance and security or adding syntactic sugar. Roblox has a market cap near $100B and has multiple developers working full-time on Luau. | ||
▲ | parenwielder 3 days ago | parent | prev [-] | |
Luau isn't "Lua but with types," but rather a language in the Lua family that has grown a powerful gradual type system with a _ton_ of type inference (this is in contrast to e.g. TypeScript which takes the approach more of "add annotations to get benefits"), as well as a growing number of additions to the language that we believe make it a more pleasant developer experience to use. We're very focused on preserving the general ability to embed the language readily and with low costs to binary size and so forth, but we're less ruthlessly committed to the language's simplicity (for both better and worse). Overall, the goal is an embeddable language related to Lua with a focus on developer tooling and a positive developer experience such that people actually want to (and enjoy) build(ing) software in the language, rather than e.g. build large C projects and then expose them to Lua. |