1. What it is: Lua++ transpiles to Lua 5.1 and runs on a statically linked LuaJIT, so it keeps Lua's runtime semantics and adds classes with single inheritance, f-strings, ?. and ??, |>, ternaries, match, enums and continue. It is about 14k lines of C (lua++ has no VM of its own) plus a game-oriented standard library written in Lua++ (the least tested part of the project).
2. Why I built it: Lua is a great embeddable runtime, but writing big game systems straight in it means going without classes, string interpolation and null safety. I wanted those as compile-time sugar, so LuaJIT stays the thing that runs the code. I also think a project should show its misses, not only its checks, so the repo has a HALL_OF_BUGS.md and runs its own docs as tests.
3. Try it in a minute (needs a C compiler and CMake 3.16+):
git clone https://github.com/Noor-AlHussain/LuaPlusPlus.git
cd LuaPlusPlus
make
build/lua++ examples/hello_world.lpp
build/lppdb check examples/hello_world.lpp
4. Limits: experimental beta; tested on Linux x86-64 only; programs cannot receive arguments; a string literal is at most 511 bytes; lppdb interp differs from the JIT in places listed in KNOWN_LIMITATIONS.md.
5. What I want: a program where scripts/diverge.sh says the backends differ (it runs lua++ and a slow tree-walk interpreter that I use as a test oracle; CHALLENGE.md lists the four I already know, and a new find goes into HALL_OF_BUGS.md with your handle on its regression test), and any place where the syntax feels wrong. Candidates: obj.method() with a dot does not pass self on the JIT (undecided whether it should), identifiers are ASCII-only (also undecided), and keywords are case-insensitive (PRINT, Print, pRiNt).
Noor-AlHussain•11m ago
2. Why I built it: Lua is a great embeddable runtime, but writing big game systems straight in it means going without classes, string interpolation and null safety. I wanted those as compile-time sugar, so LuaJIT stays the thing that runs the code. I also think a project should show its misses, not only its checks, so the repo has a HALL_OF_BUGS.md and runs its own docs as tests.
3. Try it in a minute (needs a C compiler and CMake 3.16+):
4. Limits: experimental beta; tested on Linux x86-64 only; programs cannot receive arguments; a string literal is at most 511 bytes; lppdb interp differs from the JIT in places listed in KNOWN_LIMITATIONS.md.5. What I want: a program where scripts/diverge.sh says the backends differ (it runs lua++ and a slow tree-walk interpreter that I use as a test oracle; CHALLENGE.md lists the four I already know, and a new find goes into HALL_OF_BUGS.md with your handle on its regression test), and any place where the syntax feels wrong. Candidates: obj.method() with a dot does not pass self on the JIT (undecided whether it should), identifiers are ASCII-only (also undecided), and keywords are case-insensitive (PRINT, Print, pRiNt).