r/lua • u/Old_Sand7831 • Nov 10 '25
Discussion What’s a Lua feature you wish other scripting languages had?
Lua’s simple but powerful what part do you miss elsewhere?
52
Upvotes
r/lua • u/Old_Sand7831 • Nov 10 '25
Lua’s simple but powerful what part do you miss elsewhere?
37
u/CadmiumC4 Nov 10 '25
Being tailor made for embedding. I examined so many scripting languages that provide an embedding feature before deciding that Lua is the best option to embed in my program as an extension and scripting language (p.s. and I write it in Lua for a full circle)
32
u/dan200 Nov 10 '25
Multiple return values. For all programming languages, not just scripting langs.
8
u/notkraftman Nov 10 '25
Passing more than one variable back from a function call without the shitty packing and destructuring
5
u/nrnrnr Nov 10 '25
The embedding API.
4
u/luther9 Nov 10 '25
Proper tail calls.
11
u/kayinfire Nov 10 '25
the ability to use only one construct to define an array, hashmap, and object all in one. at first glance, it wouldn't seem like a big deal, but the versatility and flexibility of the table in Lua is one of the premier reasons why it is an absurdly simple language in both theory and in practice
3
u/Isogash Nov 10 '25
Just what you said, I mostly miss the simplicity. Other languages tend to have some analogous feature to every Lua feature, so that's never really an issue that I'm missing a feature, more that I have to deal with those other languages' complexity barriers.
My favourite Lua feature that not all other languges have is coroutines though.
2
u/LXMNSYC Nov 10 '25
Simplicity. But for specifics, I guess metatables. One hell of a crack
2
u/RelatableRedditer Nov 11 '25
Metatables and coroutines are very useful in Lua compared to languages like JavaScript, but I really hate how typeless Lua is in comparison. RXJS is an amazing leap forward in terms of asynchronous programming though, but it takes a very long time to learn.
2
u/[deleted] Nov 10 '25
Is lua considered a scripting language?
1
u/matejcik Nov 13 '25
i’d kill to have Lua’s coroutines in Python. or any major language at all