Why has Python been backed by google and become so rapidly popular and Lua has not?

Do you know why Lua has stayed in background?

  • 6
    Lua likes to pretend arrays and dictionaries are the same thing, and has a length getter that can not only return wrong results, but nondeterministic results. I don't know what Googles reasons are, but this is enough reason for me to dislike it.
    – user8709
    Aug 8, 2011 at 7:47
  • 6
    To me, Python is easier to code in, more enjoyable, and has more features. Some examples from the top of my head: generators come as a first-class citizen in Python (yield), and Lua requires more cumbersome setup. Python's list indexing [::] is a huge plus. Python has legitimate classes and inheritance. Lua is faster, yes, but I actually like writing Go code for use in Python when speed is important. May 17, 2016 at 17:54
  • I love LuaJIT but a big part of my love for it is its ease of embedding, speed, and teeny footprint. If I had to program in something all day long, I might lean more towards Python.
    – user204677
    Dec 1, 2017 at 2:04
  • 1
    @FrankBryce you got it backwards. Python's generators are a subset of Lua's coroutines. See inf.puc-rio.br/~roberto/docs/MCC15-04.pdf
    – user183922
    Aug 31, 2019 at 14:55

3 Answers 3


I really love Lua, but it does have some real limitations, and as others have mentioned they derive mostly from Lua's origins as a configuration file language and then later as an embedded scripting language.

Because of the goal to keep Lua small, there exists only a very tiny standard library, that has only bare bones functionality.

This has lead to an unfortunate culture in Lua circles where Lua developers like to re-implement the functionality offered by many other language's standard libraries themselves rather than working collectively on a universally accepted set of core libraries.

Things like multi-threading, regular expressions, platform independent file access methods, and even bit operations (until 5.2) ere all "not included" since they would make Lua much larger and slower. Sure you can get libraries do so these things - but then those have independent maintainers and quality levels.

Don't get me wrong. I love Lua for the same reasons I have just listed.


Simple : Lua have more "niche" objectives than Python.

Python is thought to be useful as a general programming language. So, it's useful in a lot of cases. It covers many well known types of application but doesn't enter directly into competition with other languages that might be targeted at specific constraints, but the simplicity of it's syntax.

Lua is totally targeted to be an embedded scripting language. It's initial purpose, even if it's used in other contexts currently, like build systems; is to be embedded in software and to allow easy implementation of domain-specific script functions and structures. It's so minimalist that it can even be used on really constrained hardware (I used Lua on NintendoDS), it's lightweight, easy to use, FAST, and is such a minimalist language but thought to be extended that a lot of dialect (importing paradigms like object-orientation) are available. It's so portable (ANSI C) that you can use it on any embedded hardware with decent amount of memory for modern embedded software (if I remember well the default lua vm is around 400ko and will almost never grow if you don't loop creating objects...).

So, Lua is initially used in context where you need to embed a scripting language for your application.

Python is used for...almost anything that doesn't require a more niche language (you can make quite performant games using Python, but some kind of performance-heavy games really require to avoid such system).

It's simply that Python is used in more contexts than Lua. As far as I know, other than Android (that provide Java and native language support), Google isn't an embedded software company so they don't really need Lua everywhere, while Python is useful for anything they do (web, build system, communication, web and web).

Python is used in a lot of games for embedded scripting too, but it's heavy and slower than Lua. The syntax of Python makes it more appropriate for big games that rely a lot on scripted information in their game structure (not sure I'm clear there but just think that if you need a "real complete language" for scripting, embedding Python might be a good idea, if the performance is fine for you). Python was not made to be embedded, so that's fine. An equivalent of Python that is targeted at being embedded in C++ is Falcon.

For extreme comparison, some languages that target embedding and try to have more complete syntax than the minimalist Lua, and compete on performance : ChaiScript, AngelScript, Io...

By the way, I've seen new build systems like PreMake or Bam use Lua as the build file language. The idea is that it's lightweight and well known from game developers (build systems in game developpement is a major problem). So maybe that's another domain where Lua might be more appreciated. It's certainly more user-friendly than CMake syntax....

  • 4
    I think Lua's target as an embedded language is probably a major contributor. But even still, I believe "popularity" of a language has less to with the actual design or capability of the language itself and more a matter of "right time, right place" (see PHP, for example). Apr 8, 2011 at 22:38
  • Well I think that a language targetted at specific purpose naturally appeal to specific users, making it's audience more restraint than any general-purpose language. Having a less audiance than general-purpose languages directly impact the number of people that will ever talk about it. Other than that, specific targets means specific features. Therefore, it's not good for every situation. Here for example lua alone is not a very good gui-programming language. It requires some additions to be really useful.
    – Klaim
    Apr 8, 2011 at 22:43
  • That said, I fully agree: if php wasn't used for such a widely used field as web-site developpement, it wouldn't be everywhere now.
    – Klaim
    Apr 8, 2011 at 22:48
  • Lua is mainly used as embedded language but it is a general purpose programming language, for instance you can make CGI script with mod_lua. I could change my question to why lua stayed as an embedded language?
    – BenjaminB
    Apr 8, 2011 at 23:01
  • Because it's it's origin. You can use it as a general purpose language yes, as you can use php too for general purpose. You can also use Perl to do the same. But their origins makes their orientations. Again, their initial purpose makes them less useful than other languages for general purpose languages. Lua lack some feature language to be easy to use with GUI system for examples, like object orientation (that you can add easily, but it's not native). Make sure you see the difference between a language originally made for specific purpose and a general one. They all have constraints anyway.
    – Klaim
    Apr 10, 2011 at 11:35

You can do everything with Lua, it's created as a scripting language to extend programs? Yes, but it's far from limited to it, there is a lot of libraries for Lua, and with the right tools(LuaJIT's FFI or tolua) you can even use a C/C++ Library on it. The reason that makes Python more used in my point of view are only age, Python is used as first languages in many colleges and schools, there is more people that know Python than Lua, and is much more easy to found a good library for Python than for Lua, because the language is more mature. Also, i don't know much about Python, but as much as i know, it's easy to hide your code from the end-user, what in Lua, isn't that easy, i'm right?

Not the answer you're looking for? Browse other questions tagged or ask your own question.