Search icon
Subscription
0
Cart icon
Close icon
You have no products in your basket yet
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Lua Quick Start Guide

You're reading from  Lua Quick Start Guide

Product type Book
Published in Jul 2018
Publisher Packt
ISBN-13 9781789343229
Pages 202 pages
Edition 1st Edition
Languages
Author (1):
Gabor Szauer Gabor Szauer
Profile icon Gabor Szauer

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 £13.99/month. Cancel anytime}