▲ | aw1621107 3 days ago | |||||||||||||||||||||||||||||||
To further elaborate, here's a more detailed breakdown of tokei's line counts for each of the directories you list + the CodeGen directory: - Analysis: 62821 lines of C++ code, 9254 lines of C headers - Ast: 8444 lines of C++, 2582 lines of C headers - CodeGen: 21678 lines of C++, 4456 lines of C headers - Compiler: 7890 lines of C++, 542 lines of C headers - VM: 16318 lines of code, 1384 lines of C headers Compare to Lua 5.1, which tokei says has 11104 lines of C and 1951 lines of C headers in the src/ directory. | ||||||||||||||||||||||||||||||||
▲ | HaroldCindy 3 days ago | parent [-] | |||||||||||||||||||||||||||||||
To be fair, both `Analysis` (the type-checker, not necessary at runtime or compile time) and `CodeGen` (the optional JIT engine) have no equivalent in PUC-Rio Lua. If you look purely at the VM and things necessary to compile bytecode (AST, Compiler and VM) then the difference in code size isn't as stark. Having worked with both Lua 5.1 and Luau VM code, Luau's codebase is a heck of a lot nicer to work on than the official Lua implementation even if it is more complex in performance-sensitive places. I have mixed feelings on the structural typing implementation, but the VM itself is quite good. | ||||||||||||||||||||||||||||||||
|