Do you mind if a language is slow or fast like C or C++? C++ seems to be used by most because of its speed and the fact that its multiparadigm.
Why hasn't any language be made as fast as C? Lua is like 10x slower than C even though it's like the fastest scripting language.
What would happen if lua were a compiled language?
Languages don't have "speed". their implementations do. (Allthough some language features in higher level languages can make certain optimizations very difficult for a compiler to perform) JIT compilation as it is used by Java and C# however has its own performance advantages but it is difficult to take advantage of them on the client due to the long startup delay you get if you try to do heavy optimization when the program starts, This is one of the reasons for Javas popularity on servers. The server JVM can greatly outperform todays C and C++ compilers in code that makes heavy use of dynamic dispatch for example.
Languages such as D and Go have the potential to be as fast as C or C++ (or even faster if they become more popular) but they're not popular enough (and probably never will be due to inertia), currently the best Go compiler is quite a bit slower than Oracles Java VM or Microsofts .Net.
The compiler is ultimatly responsible for generating "optimal" assembly. The opensource community, Microsoft, (Apple ??), and CPU manufacturers push millions of dollars into compiler R&D primarily for C++ due to its popularity(The OS and/or CPU with the best performing C++ compiler has a huge advantage over the competition since the compiler has such a big impact on the final performance.
Microsoft and Oracle also push quite a bit of resources into the .Net and Java runtimes but they are far harder languages to optimize due to the safety requirements (Java also suffers quite a bit from its early focus on the Sparc CPU architecture(parts of the language can't run natively on a x86 CPU).
When it comes to scripting languages such as Lua, Python, etc the only sane option is interpretation and JIT compilation (Having to recompile your scripts using a AOT compiler before you can test even a minor change would remove one of the biggest advantages you get from a scripting language and many of these languages allow you to create and modify functions, classes, etc at runtime and have the changes take effect immediatly (this is a huge advantage when you are tweaking gameplay code as you can enter your changes using a in-game console while the game is running, see the result immediatly and save or discard your changes as you see fit rather than having to recompile and restart the application every time you wish to test a small change)
[size="1"]I don't suffer from insanity, I'm enjoying every minute of it.
The voices in my head may not be real, but they have some good ideas!