Hacker News new | ask | show | jobs
by jshmrsn 1116 days ago
There’s a lot of surface area to cover. In my opinion, the main thing that holds Lua back from wider adoption is the thing that makes it useful for its niche case. That is, the runtime and standard library are extremely small, making it easy and lightweight to embed in programs across a variety of platforms. However, that minimalist runtime and standard library also mean that it’s hard to deliver Lua libraries and frameworks without requiring native code extensions (e.g. any kind of networking and serious file system interactions) would require platform-specific extensions. Additionally, because Lua is so simple (for example there is no built-in concept of classes), the way to write code in Lua is quite open-ended. Many Lua users use their own or one of many prebuilt class systems. Using code from someone’s library might mean pulling in its custom class system and interacting with it as well. Custom class systems can be somewhat magical and involve metatable and suddenly things aren’t very simple anymore. Lua is also just a bit odd to use with one based indices, tables being kinda-sorta arrays if you use them in just the right way, needing to use pairs vs. ipairs in loops, variables being global by default if you forget to type “local” (unless you use Lua strict, and also all the libraries you want to use are compatible).