Skip to Content
Lua Quick Start Guide
book

Lua Quick Start Guide

by Gabor Szauer
July 2018
Beginner
202 pages
5h 42m
English
Packt Publishing
Content preview from Lua Quick Start Guide

Tables and Objects

The only data structure provided by Lua is the table. As discussed in Chapter 2, Working with Lua, the table is one of the built-in data types Lua provides. Tables are powerful enough to implement other data structures, such as lists, queues, or stacks.

Lua is not object-oriented; the language does not have support for objects. However, using tables and meta-tables, an object system can be implemented from the ground up. By the end of this chapter, you will have implemented an object system in Lua.

This chapter will cover the following topics:

  • Introduction to tables
  • Arrays
  • Iterating
  • Meta tables
  • Objects
  • Inheritance
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Lua Programming

Beginning Lua Programming

Kurt Jung, Aaron Brown
Vim Masterclass

Vim Masterclass

Jason Cannon

Publisher Resources

ISBN: 9781789343229Supplemental Content