Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Lua Quick Start Guide

You're reading from   Lua Quick Start Guide The easiest way to learn Lua programming

Arrow left icon
Product type Paperback
Published in Jul 2018
Publisher Packt
ISBN-13 9781789343229
Length 202 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Gabor Szauer Gabor Szauer
Author Profile Icon Gabor Szauer
Gabor Szauer
Arrow right icon
View More author details
Toc

Objects

Many programming languages support the concept of Object-Oriented Programming (OOP). OOP is a methodology that couples data (variables) and logic (functions) into one cohesive unit (object). While Lua is not an object-oriented language, it does provide all the facilities to allow us to implement an object system.

The class is a core construct in OOP. The class is a single template from which multiple objects can be built. A common analogy is to compare a class to the blueprint of a house. The blueprint defines the dimensions and layout of a house, and many houses can be produced from a single blueprint.

Even though many houses can be made from the same blueprint, they are independent of each other. If one home owner adds a room to a house, it will not affect any other houses. But, if a room is added to the blueprint of that house, all future houses will have that room...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at ₹800/month. Cancel anytime