4 ms·
Lua is optimised for interpreter size, Python for "language niceness / flexibility", and it shows. Lua has lots of nits, such as the index starts at 1 thing, o
by rstuart4133 5y ago
Lua is optimised for interpreter size, Python for "language niceness / flexibility", and it shows. Lua has lots of nits, such as the index starts at 1 thing, or the "all numbers are floats" thing. I also find its class mechanism ugly, but the most annoying one for me is it suffers from the totally unnecessary "a variable is global by default" bug.
However, life is full of unexpected surprises. While Lua small engine size was a deliberate strategy to make it cheap to embed, it also meant it's much easier to optimise than something the size of Python. And ... that's what happened, so LuaJit is the fastest interpreted language - even faster than the best javascript engines when I last looked. That despite javascript engines having had man decades of optimisation effort put into them.
- portaltonowhere 5y agoFWIW, Lua 5.3 (released in 2015) introduced integers. But agree with the rest.
- int_19h 5y agoIndices starting at 1 in Lua is a deliberate design decision, though.