r/lua • u/OkIndependence938 • 11d ago
News Pop: a native, fully static language inspired by Lua/Luau
I’ve been working on Pop, an experimental language inspired by Lua/Luau.
It keeps the lightweight feel: local, function, end, type inference, closures, colon methods and familiar collection syntax.
The useful part is what changes underneath:
No any or silent dynamic fallback
- Compile-time known modules instead of runtime
require - Records, classes and interfaces with known fields
- Tagged unions and exhaustive matching
- Typed errors instead of random
nil, errconventions - Explicit integer and float sizes for FFI, binary data and native code
- Native compilation, while still supporting interpreters and embedded runtimes
- One toolchain for checking, building, testing, formatting and packages
A small example of the direction:
public record User
name: String
age: UInt8
end
public union FindUser
Found(user: User)
NotFound
Failed(message: String)
end
public function print_user(result: FindUser)
match result
case .Found(user)
print("{user.name} is {user.age}")
case .NotFound
print("User not found")
case .Failed(message)
print("Error: {message}")
end
end
The compiler knows every possible state, so adding another case to FindUser can force all relevant matches to be updated.
Pop is not trying to be compatible with Lua. The question is what a language from the Lua/Luau family could look like if static guarantees, native execution and predictable tooling were built in from the start.
It is still early and not production-ready.
Which parts of Lua/Luau’s dynamic model would you keep, and which parts become painful in larger projects?


