<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/creator-of-lua-scripting-programming-languages-predictions-irrmt1pkr" -->

---
title: Creator of Lua: Scripting, Programming Languages,...
description: Roberto Ierusalimschy, creator of Lua, explains what makes Lua a true scripting language designed for embedding into C/C++ programs, contrasting it with...
canonical: https://daily.dev/posts/creator-of-lua-scripting-programming-languages-predictions-irrmt1pkr
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Creator of Lua: Scripting, Programming Languages, Predictions | daily.dev
og:description: Roberto Ierusalimschy, creator of Lua, explains what makes Lua a true scripting language designed for embedding into C/C++ programs, contrasting it with...
og:url: https://daily.dev/posts/creator-of-lua-scripting-programming-languages-predictions-irrmt1pkr
og:image: https://api.daily.dev/og/posts/iRrmT1PKr.png
og:image:alt: Creator of Lua: Scripting, Programming Languages, Predictions
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Creator of Lua: Scripting, Programming Languages, Predictions

**[The Developing Dev](https://daily.dev/sources/developingdev)** · 47 min read · 8 upvotes · 0 comments

## Summary

Roberto Ierusalimschy, creator of Lua, explains what makes Lua a true scripting language designed for embedding into C/C++ programs, contrasting it with Python's philosophy. Key topics include how Lua's library-first design enables bidirectional C-Lua calls via function pointers, why Lua is faster than Python (minimalism, smaller VM footprint), how LuaJIT's trace compiler works and why JIT is hard, the role of type systems in compilation, Lua's unique design decisions (1-based indexing, no global state, load vs eval, sandboxing), and predictions on AI's impact on programming languages. Roberto also recommends learning languages with distinct paradigms to broaden engineering thinking.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.developing.dev/p/creator-of-lua-scripting-programming>

## Questions this post answers

### Why is Lua 1-indexed instead of 0-indexed like most programming languages?

Lua uses 1-indexing because its creator considered it more intuitive for end-user programmers, mirroring how humans naturally count in the real world (book chapters, matrix positions). Zero-indexing became popular mainly because of C, where array indexing is actually pointer arithmetic (offsets from a base address), not true indexing, so zero was a natural byproduct rather than a deliberate choice.

_Anyone weighing language conventions like indexing can find these design tradeoffs explained on daily.dev._

### How does Lua allow C code and Lua code to call each other?

C calls Lua functions by treating them as data structures (arrays of bytecodes) and invoking the Lua interpreter to run them, while Lua calls C functions through registered C function pointers stored in an internal data structure tied to names. This bidirectional mechanism supports recursive nesting, where Lua calls C, which calls Lua again, and so on.

_Developers embedding scripting languages into C-based systems can dig deeper into these patterns on daily.dev._

### Why is LuaJIT's trace compiler so fast but hard to maintain?

LuaJIT's trace compiler records everything executed in a frequently-run loop, including inlined function calls, and compiles that entire trace assuming consistent types (like integers), which makes execution extremely fast. The difficulty comes from needing a custom pseudo-assembler to target multiple machine architectures and from handling 'trace exits,' where a type assumption breaks and the interpreter must reconstruct state that was never explicitly created, such as missing call stacks.

_Engineers evaluating JIT tradeoffs for dynamic languages can explore performance deep-dives like this on daily.dev._

## Similar posts on daily.dev

- [Lua 5.5 readme](https://daily.dev/posts/lua-5-5-readme-o5g20gawy) · Lobsters · 2 upvotes · 0 comments
- [minimalism as a harness](https://daily.dev/posts/minimalism-as-a-harness-alevfxc8x) · Vincent D. Warmerdam · 4 upvotes · 1 comments

---

Tags: [#lua](https://daily.dev/tags/lua)

[View this post on daily.dev](https://daily.dev/posts/creator-of-lua-scripting-programming-languages-predictions-irrmt1pkr)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Creator of Lua: Scripting, Programming Languages, Predictions","url":"https://daily.dev/posts/creator-of-lua-scripting-programming-languages-predictions-irrmt1pkr","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/creator-of-lua-scripting-programming-languages-predictions-irrmt1pkr"},"datePublished":"2026-08-03T13:10:38.279Z","dateModified":"2026-09-14T06:04:22.961Z","description":"Roberto Ierusalimschy, creator of Lua, explains what makes Lua a true scripting language designed for embedding into C/C++ programs, contrasting it with...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/15555d6093c52008fb420b0450919174?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/15555d6093c52008fb420b0450919174?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"The Developing Dev","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"The Developing Dev","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1/logos/c19307d4b9a74379871c33d6f72a6b10","url":"https://daily.dev/sources/developingdev"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/creator-of-lua-scripting-programming-languages-predictions-irrmt1pkr","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":8},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"lua","timeRequired":"PT47M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"The Developing Dev","item":"https://daily.dev/sources/developingdev"},{"@type":"ListItem","position":3,"name":"Creator of Lua: Scripting, Programming Languages, Predictions"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/creator-of-lua-scripting-programming-languages-predictions-irrmt1pkr#faq","mainEntity":[{"@type":"Question","name":"Why is Lua 1-indexed instead of 0-indexed like most programming languages?","acceptedAnswer":{"@type":"Answer","text":"Lua uses 1-indexing because its creator considered it more intuitive for end-user programmers, mirroring how humans naturally count in the real world (book chapters, matrix positions). Zero-indexing became popular mainly because of C, where array indexing is actually pointer arithmetic (offsets from a base address), not true indexing, so zero was a natural byproduct rather than a deliberate choice. Anyone weighing language conventions like indexing can find these design tradeoffs explained on daily.dev."}},{"@type":"Question","name":"How does Lua allow C code and Lua code to call each other?","acceptedAnswer":{"@type":"Answer","text":"C calls Lua functions by treating them as data structures (arrays of bytecodes) and invoking the Lua interpreter to run them, while Lua calls C functions through registered C function pointers stored in an internal data structure tied to names. This bidirectional mechanism supports recursive nesting, where Lua calls C, which calls Lua again, and so on. Developers embedding scripting languages into C-based systems can dig deeper into these patterns on daily.dev."}},{"@type":"Question","name":"Why is LuaJIT's trace compiler so fast but hard to maintain?","acceptedAnswer":{"@type":"Answer","text":"LuaJIT's trace compiler records everything executed in a frequently-run loop, including inlined function calls, and compiles that entire trace assuming consistent types (like integers), which makes execution extremely fast. The difficulty comes from needing a custom pseudo-assembler to target multiple machine architectures and from handling 'trace exits,' where a type assumption breaks and the interpreter must reconstruct state that was never explicitly created, such as missing call stacks. Engineers evaluating JIT tradeoffs for dynamic languages can explore performance deep-dives like this on daily.dev."}}]}
```

