{}const=>[]async()letfn</>var
LuaDevelopment

The secret of an easy start in programming is Lua minimalism

Everyone says "learn Python", but we suggest first looking at Lua — a language with 8 data types, one structure for all occasions and 30 pages of documentation. We understand why minimalism in a programming language is not a bug, but a superpower for beginners.

К

Kodik

Author

6 min read

When the whole world is screaming "learn Python" and you're like, "What if I don't?"

Let's be honest. You open any guide on "how to get into IT" — and it's the same thing: Python, JavaScript, maybe Java for masochists. All roads lead to the same jungle of frameworks, package managers, and node_modules the size of a galaxy.

Now imagine a language in which everything fits into a single 30-page PDF. The whole language. In its entirety. With all the nuances.

🔥 100,000+ students already with us

Tired of reading theory?
Time to code!

Kodik — an app where you learn to code through practice. AI mentor, interactive lessons, real projects.

🤖 AI 24/7
🎓 Certificates
💰 Free
🚀 Start learning
Joined today

"Lua? Is that the one in the games?"

Yes, and not just "in games." Lua is a scripting engine in World of Warcraft, Roblox, Garry's Mod, Factorio, and LÖVE 2D. If you have ever installed an add-on for WoW or written a mod for your favorite game, then you have already used Lua. You just might not have known about it.

But games are just the tip of the iceberg. Lua runs inside Nginx (via OpenResty), Redis, Wireshark, Adobe Lightroom, and even in router firmware. This little language has literally crawled everywhere, because it has a superpower: he does nothing superfluous.

Minimalism as a philosophy, not the laziness of developers

The creators of Lua from the Brazilian university PUC-Rio did not set a goal to make "another programming language". They wanted to make embedded script engine, which weighs less than the average picture in your chat.

And here's what happened:

The entire Lua runtime is ~300 KB. For comparison, the Node.js installer alone weighs 200+ times more. And node_modules of an average project... well, you know the joke.

Data types in Lua are exactly 8 pieces: nil, boolean, number, string, function, table, userdata, and thread. That's it. There are no separate arrays, dictionaries, sets, or tuples. There is one universal structure — table — and it covers everything.

-- Массив? Table.
local fruits = {"apple", "banana", "cherry"}

-- Словарь? Table.
local user = {name = "Alexey", level = 42}

-- Объект с методами? Тоже table.
function user:greet()
    print("Hi, I'm " .. self.name)
end

user:greet()  -- Привет, я Алексей

One data structure to rule them all. Frodo approves.

Why minimalism = easy start

When you sit down to learn Python, you are immediately thrown into: lists, tuples, sets, dictionaries, generators, decorators, context managers, __dunder__ methods... And this is before the first real project.

In Lua, you master in the evening all syntax. No kidding. Here's a crash course for you:

-- Переменные
local name = "Code"
local age = 3
local is_cool = true

-- Условия
if is_cool then
    print(name .. " - cool!")
elseif age > 10 then
    print("Old school")
else
    print("Well, okay")
end

-- Циклы
for i = 1, 5 do
    print("Iteration: " .. i)
end

-- Функции
local function add(a, b)
    return a + b
end

print(add(2, 2))  -- 4, математика не подвела

That's it. Seriously. You already know 80% of Lua. The remaining 20% are metatables, coroutines and work with the C API, but this is already for advanced users.

The beginner's brain does not overheat from dozens of concepts. Instead, you immediately begin make pieces: write scripts, create game logic, automate tasks.

Table — ingenuity in simplicity

Do you know what drives me crazy the most in Lua? The fact that table is an array, a hash table, an object, a module, and a namespace. All in one.

-- Создаём «класс» через table + метатаблицы
local Animal = {}
Animal.__index = Animal

function Animal.new(name, sound)
    local self = setmetatable({}, Animal)
    self.name = name
    self.sound = sound
    return self
end

function Animal:speak()
    print(self.name .. " says: " .. self.sound)
end

local cat = Animal.new("Cat", "Meow")
local dog = Animal.new("Dog", "Woof")

cat:speak()  -- Кот говорит: Мяу
dog:speak()  -- Пёс говорит: Гав

No keyword class. No extends. No interface. You by myself you build OOP from basic bricks. And in the process, you really understand how object-oriented programming works under the hood, and not just memorize the syntax.

It's like a LEGO set: there are few parts, but you can assemble anything.

"Okay, but where can I use it?"

Fair question. Here are real scenarios where Lua is not just a toy:

GameDev. LÖVE 2D is a framework for 2D games on Lua. The entry threshold is so low that the first game can be written over the weekend. Celeste, by the way, started as a prototype on PICO-8, which uses a subset of Lua.

Web development. OpenResty turns Nginx into a full-fledged web server with Lua scripts. The speed is out of this world, and the memory consumption is laugh.

Lua as a first language: pros and cons

The main argument in favor: cognitive load tends to zero. The beginner does not drown in the ecosystem. Does not choose between pip, conda, poetry and pipenv. They don't google how let differs from const and var. They just write the code and see the result.

And when the basic concepts — variables, loops, functions, data structures — are in your head, switching to Python or JavaScript turns into "ah, it's just a different syntax" instead of "MOM, GET ME OUT OF HERE."

Lua's minimalism teaches you to think like a programmer, not like a user of a specific framework.

Try it right now

Do you want to touch Lua with your hands? You don't need to install anything. Open any online Lua interpreter and write your first script:

local things_i_learned = {
    "variables",
    "terms",
    "cycles",
    "functions",
    "tables"
}

print("I learned in one evening:")
for i, thing in ipairs(things_i_learned) do
    print(i .. ". " .. thing)
end
print("And that's all Lua 😎")

Launch. Smile. You're already a programmer.

Want to dig deeper?
Come to Kodik!

If you are hooked on the idea of starting simple and moving to complex without pain, this is exactly what we do in Code.

Code is an application where programming is learned through practice. No hour-long lectures "into the void". Each lesson is a task that you solve yourself, getting instant feedback. Python, JavaScript, HTML, CSS and other technologies - everything is laid out on the shelves and served so that even a complete zero could figure it out.

And we also have Telegram community, where already more 2000 developers. There are useful posts on programming, task analysis, memes (where without them) and live discussions. A great way to repeat the material and keep your finger on the pulse — right on your phone while you're on the subway or waiting in line.

Minimalism in the approach to learning works as well as Lua minimalism: less noise — more results.

Lua is not a "language for games" and not "another exotic language". It is proof that power does not require complexity. A language that fits in the head entirely frees up brain resources for the most important thing — solving problems.

Start small. Try Lua. Feel what it's like when language doesn't get in the way, but helps you think. And then, with this foundation, conquer anything: Python, Rust, Go — it doesn't matter. The principles will stay with you.

Minimalism is not a limitation. It's a superpower. 🚀

🎯Stop procrastinating

Liked the article?
Time to practice!

In Kodik, you don't just read — you write code immediately. Theory + practice = real skills.

Instant practice
🧠AI explains code
🏆Certificate

No registration • No card