What I think about Lua after shipping a project with 60k lines of code

Lua’s role as an embedded and game scripting language is praised for its simplicity, portability, and ease of integration, with several developers reporting successful use in games, trading systems, and tooling. At the same time, many criticize its dynamic typing, table semantics, GC pauses, and weak standard library for making large codebases harder to maintain and debug, often contrasting it with statically typed alternatives like Rust or typed Lua variants (Teal, Luau, Fennel). The thread also touches on broader questions about scripting vs. compiled languages in game development, mod support, and how editor and tooling quality shape language adoption.

Lua in game development & scripting

  • Many commenters use Lua for game logic (including large projects, Love2D games, fantasy consoles, engines, mods), trading systems, ad targeting, Redis scripts, Wireshark dissectors, neovim and other app scripting.
  • Praised as extremely simple, small, and easy to embed; ideal as a DSL for domain experts and moddability.
  • Some see it as “perfect for application scripting” but not their first choice for full core engines or very large, long‑lived systems.

Scripting vs compiled languages in games

  • Linked video criticizing scripting languages in gamedev sparked debate.
  • Arguments against scripting for core game logic: performance, error‑proneness with less experienced scripters, complex engine integration.
  • Counterpoints: scripting is great for mods, E2E tests, iterative gameplay tweaks, and separating core engine (C/C++/Rust) from high‑level behavior.
  • Several claim modern hot‑reload and fast compilers in compiled languages partially replace scripting’s iteration advantages.

Tables, typing, and language design

  • “Everything is a table” is both admired and disliked:
    • Pro: powerful, uniform data model, good for ASTs/DSLs, simple mental model.
    • Con: no clear separation between arrays and maps; # and “sequence” rules are non‑obvious; holes and nils are footguns.
  • One‑based indexing and nil‑on-missing are frequent pain points; silent nil on typos leads to late runtime failures.
  • Dynamic typing seen as liberating for prototypes but fragile for large codebases.
  • Typed variants (Teal, Luau) and comment‑based annotations plus LSPs are discussed; some prefer gradual typing, others dislike transpile steps.

Performance, GC, and tooling

  • Performance is “adequate” for scripting, but some in engines hit GC pauses and need careful tuning or native fallbacks.
  • LuaJIT is cited as very fast but version‑locked.
  • Tooling has improved (language servers, linters, IDE support), but some still find it weaker than mainstream languages.

Ecosystem, packaging, and alternatives

  • Embeddability and trivial C build are major advantages over Python and others, especially on unusual platforms or kernels.
  • LuaRocks works for some but is seen as messy or ignored by many; dependency management on Windows can be painful.
  • Alternatives mentioned: Rust, C#, Go, Scheme‑like/Fennel on top of Lua, other new systems languages, but Lua remains valued for its niche of small, embeddable scripting.