[Nelua](https://nelua.io/) is a transpiled systems programming language designed to look like [[Lua]].
# Notability
I see it as the natural successor to [[Terra]].
Uses [[Lua]] at compile-time for metaprogramming, but unlike [[Terra]], Nelua is the first-class language and Lua is only used as a macro language within special templating tags, similar to [[Crystal]]'s macros or ERB.
# Example
```lua
-- Calculates the factorial of a number.
local function factorial(n: integer): integer
if n == 0 then
return 1
else
return n * factorial(n - 1)
end
end
local n = 5
local res = factorial(n)
print(n, 'factorial is', res)
```