Why use an interpreted language to make a compiled one adjustable "on-the-fly"?

89 Views Asked by At

I've read about certain programs, such as the Civilization video game series, using interpreted components (Lua in this case) to interface with compiled ones (C++ I assume) to allow for user extendability through mods and such. Why is invoking a virtual machine in such a manner, when I assume you could just write and bake in your own compiled-language extensions, helpful?

1

There are 1 best solutions below

2
On BEST ANSWER

You could totally make your own compiled extensions! But that is a lot of work, then you have to teach the users to use your programming language.

Easier to interface with a known, stable language which is easy to interface with (like Lua).