/
Lua

Lua

Lua is language which originates from Brazil. In Portuguese the word means “moon”.

At one level you can think of this language being like a very simple form of Javascript that instead of having squiggly braces like { } for starting and ending blocks of code uses a pascal type notation like this:

-- This is Lua function Foo(Data) return "Hello "..Data -- Concatenating strings in Lua is like this end

whereas this is Javascript:

// This is Javascript function Foo(Data){ return "Hello " + Data }

Lua has a much simpler, much smaller implementation that Javascript. The whole implementation fits within a few C files whereas typical implementations of Javascript like the V8 engine in Chrome are much much more complicated and larger.

Why does Lua have so much less complexity than Javascript?

It’s to do with the different values and process via which Lua was developed. Lua is developed in what could be described as very closed fashion with only three core people building the language. It also has been willing over it’s history to break backwards compatibility with earlier versions of the language to eliminate some earlier less optimal design decisions and instead evolve the language to having more simplicity and consistency with how it is implemented.

Javascript in comparison has a huge legacy issue with way too many features being added to the language. i.e. the two problems of exponential complexity and solving problems that the language designers didn’t fully understand.

Related content

What are document markup languages?
What are document markup languages?
Read with this
What is Lua?
More like this
How do we deal with web technology?
How do we deal with web technology?
Read with this
Origins of Javascript/ECMA Script
Origins of Javascript/ECMA Script
More like this
Tim Berners Lee - the father of the web
Tim Berners Lee - the father of the web
Read with this
The core types of Lua
The core types of Lua
More like this