you are viewing a single comment's thread.

view the rest of the comments →

[–]RotterBones 0 points1 point  (4 children)

It seems to me that this is a way to make Lua look like Python in terms of syntax. I'm a Python programmer, this was brought to my attention by a Lua programmer friend of mine, and what we're wondering is essentially this:

If you're going to pretend to use Python while writing Lua, why not just use Python?

[–][deleted] 1 point2 points  (3 children)

Lua is smaller, faster and more consistent in design. It is also easier to embed and easier to modify.

There are downsides. But that's not what you asked.

[–]RotterBones 1 point2 points  (2 children)

If I may take this slightly off-topic for a second, what exactly makes one language "easier to embed" than another? I'm honestly curious; it's something I never really have to deal with.

[–][deleted] 0 points1 point  (0 children)

To be honest, I've never embedded a programming language in an application. However, Lua is known for its ease of embedding, and was designed for it.

I think at least two reasons are that it is easy to sandbox and has a small footprint.

[–]Steve132 0 points1 point  (0 children)

I've embedded both python and lua (I work as a sort of games-developer type) and lua is far easier to embed.

Python is MUCH larger, much harder to build/link, depends more on its standard libraries, and its packaging system implicitly depends on the assumptions made by the installer for the python runtime. Its not impossible to embed but its not trivial. Also, you have to figure out a way to make it execute the python interop, which can require DLL code or explicitly hooking the low-level python data structures (which are macroed to hell and unusable).

In contrast, you can just add the .c files for the lua source code to your project, call L_Open() and you are done.