Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

For me, I find Lua has more clarity and consistency than Python. From the design of the language, to its implementation, to it's C API --- it's a very beautiful language.


I'll have to disagree.

When I open up any substantial Lua project, I am flooded with local local local and local. It drives me nuts coming from a Python background. Not only is there that, but they decided to use "end" which is more cluttered and longer than using brackets.

Lua also has no standard oop system which means you have to guess which half-baked version the project is using. I'm sure there are other problems I forgot to mention here.


I concur with your points. These are some of the problems I had, too, coming from a python background. To add to your list: the # operator confuses a lot of people as can be seen on the mailing list (although its semantics are well-defined actually). Nevertheless there are also convincing reasons for these decisions. Have a look at e.g. http://lua-users.org/wiki/LocalByDefault. And the use of "end" certainly helps with anonymous functions.

Purely looking at the language resp. the consistency of the design I would even say that Lua is more beautiful than Python even though Lua has its share of warts. Note that this does not say anything about which language is easier to use in practice (which is Python imho).

But that aside, I think it is important to mention that comparing Lua and Python is a bit like comparing apples to oranges as they pursue different philosophies. Lua gives you just as much as you need but no more. This is the reason why it is so flexible and suited for embedding. Python, on the other hand, is a full blown general purpose programming language with a huge community/ecosystem.


'local' is too long, yes -- I wish they'd used 'let' or even Perl's 'my'. But syntactically distinguishing declarations from assignments was totally the right decision. (I wonder if anyone's made a more Python-like frontend to Lua. Coffeelua?)




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: