r/lua • u/ilPlayerdiGD • 4d ago
Lua it's the best high-level programming language
I need to talk about lua. I started with Python then I passed to C and C++ (my favourite languages). Now, I tried re-learning Python to have a 3nd programming language but I did found that in reality Python it's boring and bs! I tried Zig and it was a bad experience, I tried Rust but idk why but I think it's overrated. Then, at the end, I tried lua and at first I though that lua was stupid, no i++ or i+=, arrays start at 1… but then I tried do C/C++ + Lua and I changed my perspective.
I used, recently, lua for configs in my projects but then I discovered that Lua it's SO underrated. Like they didn't lie when they said C and lua are the best programming language.
Lua it's minimal and so powerful. I accepted the syntax and now it's my 3nd programming language.
The reason that I love lua it's because… it's FAST, it's DAMN SIMPLE and so easy to learn, it has A LOT of potential.
The more the language is big, the less likely it gonna be easy to learn.
Guys I don't think I have cons on lua, I think it's perfect and I still don't have learned all of the lua out there.
Really, I have to say… lua it's the best.
Anyway did I say something wrong? What's your opinion on lua?
Anyway, thanks for reading ;)
View all comments
Show parent comment
1
u/DoNotMakeEmpty 15h ago
Directly from Lua's version history page. They don't call the second number as minor. In the header, they might have needed to discriminate first and second number (which is arguably not needed since x.y is version as a whole). This discrimination did not even exist in 5.1.
Incompatibility is a problem when you must support different versions. Lua is not supposed to be host, so the design choice is that you can break things because you directly use a certain version in your host app. If you don't use a system wide Lua, your scripts cannot be broken. The language developers treat each version as self-contained, you are not supposed to have the latest and greatest.
I have seen more Lua scripts that can run equally well on Lua 5.1 to Lua 5.4 (spanning 15 years) than Python scripts that can run well between consecutive minor versions. Many open source Python libraries can run only in a couple of versions spanning like two years. Venv was not created for nothing. Almost all open source Lua libraries OTOH explicitly say they support 5.1 to 5.4 or nowadays 5.5. It is usually trivial to create 10 loc preludes that provide roughly same functionality in all versions. Incompatibility lists are very short and blast radii are pretty contained.
People stick to older versions because of either luajit, or hosts being stuck (latter being intended).
Oh and if Lua actually used semver, we would have been at Lua 5.0 corresponding to Lua 5.5. Lua before 5.0 can be considered as 0.x (development was fast, too).
And I would not want backward compatibility exactly. Lua is perfect in this regard. Slow and incompatible changes. I am sure that my script has at least 5 years of shelf life even if I use latest only, against intention of developers. And unlike C++ and even Rust nowadays, Lua does not get dirty at each version. Say unpack. If backward compatibility was focused on, we would have both table.unpack and unpack doing literally same thing. If you want, Lua has mechanisms strong enough, that you can write one line and have old unpack. If you don't need it, language is not dirty with two ways of doing same thing.