tags:

views:

152

answers:

5

Is this language an OO language? Is it often used as OO language?

A: 

Lua is a powerful, fast, lightweight, embeddable scripting language.

Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua is dynamically typed, runs by interpreting bytecode for a register-based virtual machine, and has automatic memory management with incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

~ Lua: about

Justin Niessner
+1  A: 

It does support object oriented programming with some difficulty. This chapter in the official guide explains http://www.lua.org/pil/16.html

John Burton
+5  A: 

Lua is fully capable of prototype-based object-oriented programming similar to JavaScript.

Prototype-based programming is a style of object-oriented programming in which classes are not present, and behavior reuse (known as inheritance in class-based languages) is performed via a process of cloning existing objects that serve as prototypes. This model can also be known as class-less, prototype-oriented or instance-based programming. Delegation is the language feature that supports prototype-based programming.

For more information, see Chapter 16 - Object-Oriented Programming of the Programming in Lua book.

Judge Maygarden
+1  A: 

Lua it's not an OO language "per-se" but offers mechanisms to implement different styles of Object Orientation.

There are a lot of libraries that implement OO for lua. A look at lua.org (the main Lua site) or lua-users (the Lua Community Wiki) will be helpful.

Even more helpful would be to ask in the Lua Mailing list.

Remo.D
A: 

It's mostly used as a scripting tool in Apps, to extend or implement functionalities.

Micael Bergeron