4 ms·
OCaml has both compilator and interpreter. Lua isn't statically typed, and while there is Teal – a statically typed variant of Lua – it requires separate build
by Vedor 2mo ago
OCaml has both compilator and interpreter.
Lua isn't statically typed, and while there is Teal – a statically typed variant of Lua – it requires separate build step.
- Philpax 2mo agoLuau is statically typed and interpreted/JIT'd: https://luau.org/ https://luau.org/
- Vedor 2mo agoOh, nice, I didn't know - I always thought that Luau has only type annotations and is not statically typed per se. But yeah, looked into the documentation and you can set !strict mode per script, which will cause interpreter to assert the types. Looks promising. Can you tell me how well it works in practice?
- Philpax 2mo agoI've only used it for small scripts and can't say how well the type system actually functions/how it scales, but what I've seen so far has pleased me. (They have a _comptime_-equivalent! https://luau.org/types/type-functions/ https://luau.org/types/type-functions/) You may be interested in https://lute.luau.org/ https://lute.luau.org/, which is a node.js-style runtime for the language.