Lua Functional Programming/Introduction

From Wikibooks, open books for an open world
< Lua Functional Programming
Jump to: navigation, search

Introduction to Lua[edit]

What is Lua?[edit]

Lua is a fast, powerful lightweight, embeddable scripting language. Lua combines simple procedural syntax with powerful data description constructs based on associative arrays and extensible semantics. Lua has automatic memory management and incremental garbage collection, making it ideal for configuration, scripting, and rapid prototyping.

Features of Lua[edit]

The features of the lua programming language include:

  • Lua is an extension programming language
  • Suitable for use as an embedded language within a host application
  • Cross Platform Support
  • Implemented in ANSI C
  • Lightweight core occupies just 60k and executable footprint of just 140k
  • Easy to use conventional scripting language
  • Dynamic datatypes
  • Powerful builtin support for text processing
  • Interpreted bytecode compilation for fast and efficient execution
  • Stack based virtual machine model
  • Support for procedural, object oriented, functional and datadriven programming
  • Supports coercion
  • freeform syntax
  • casesensitivity
  • keywords

History of Lua[edit]

Lua was first developed in an academic laboratory as a tool for inhouse software development but it was later adopted by several industrial projects around the world and is now widely used in the game industry.

When to use Lua[edit]

Where is Lua on the hammer scale?[edit]