Lua

An interesting example of a language driven by the need for scripting in video games. It was used in Grim Fandango, World of Warcraft, and Roblox. Because games often use a slightly modified version of Lua, the community is somewhat fragmented. Lua came from the academia world, but designed to feel like it was not. Inspired by TCL and Perl. The famous LuaJIT was built outside of the core team.

A few notable differences from JavaScript:

  • Operator overloading
  • Built-in functions to manipulate environments: getfenv and setfenv
  • 1-based arrays
  • a:foo() is a.foo(a)
  • any value can be a table index

JS specification has tail calls, but in practice not every engine supports those. Lua also has coroutines for much longer.

Links