Monday, March 22, 2010

Book Review - Programming in Lua, 2nd Ed : Roberto Ierusalimschy

Programming in Lua is a great reference for developing software in the Lua scripting language. Lua is a small lightweigth scripting language that can be found at http://www.lua.org/. The best part about Programming in Lua is that the book is written by one of the the authors of the language. Roberto is a programmer from Brazil who started the Lua language as an in house language for various projects at PUC-Rio where he works in 1993. Now Lua is a widely used scripting language used in any application that can benefit from a light weight extensible scripting language.

The laguage is used extensivly in game development industry, where it has been widely accepted, however the reach of Lua has spread to other fields such as engineering and enterprise environments. This book walks the reader through using the Lua language in its native C environment, ether as a stand alone language through its useful terminal window command line interface or through embedding it within other applications. The book describes many examples of how to use features of the language to get real world results and most examples do not feel contrived but instead act like a recipe book for how to solve real world design problems using Lua as the glue of your application.

The book covers each and every major feature of the language, from introductory use of variables, program logic flow, to advanced topics such as closures and iterators as well as topics on how to handle OOP paradimes in the scripting language. This book also covers C integration as well as each of the included Lua API packages. It is a great tool to learn from as well as a great reference for anyone that is currently using Lua in a project.

The 2nd Edition covers the latest (at the time of this review) version 5.1. The erlier verson of the book only covered up to verson 5.0. The older verson of the book is available free online and is generally the first link on google when attempting to look up any information on Lua programming specifics. If you are interested in this book, I recommend taking a look at the first edition online before buying this edition.

Overall this is one of the best programming books that I have read, it was extreamly easy to pick up Lua as a scripting language for use in many of my projects. I keep this book handy at all times on my desk for quick reference.