Programming in Lua, Second Edition

Programming in Lua, Second Edition
by Roberto Ierusalimschy

Programming in Lua, Second Edition
List Price: $39.95
Our Price: $24.77
You Save: $15.18 (38%)
Availability: Usually ships in 6 to 11 days
Buy Used: from $15.97 (click here)
Category: Book
See more book details and other editions


or

Book Summary Information

Author: Roberto Ierusalimschy
Edition: Paperback
Audio: English (Unknown); English (Original Language); English (Published)
Published: 2006-03-05
ISBN: 8590379825
Number of pages: 328
Publisher: Lua.org
Product features:
  • ISBN13: 9788590379829
  • Condition: New
  • Notes: BRAND NEW FROM PUBLISHER! 100% Satisfaction Guarantee. Tracking provided on most orders. Buy with Confidence! Millions of books sold!

Book Reviews of Programming in Lua, Second Edition

Book Review: I was not impressed
Summary: 3 Stars

Naming this language after the moon is ironically apropos, as many of its lunatic creator's cognitive processes seem to randomly scramble themselves according to the phase of said moon. I'm no language designer myself, but if I were trying to come up with a high-level scripting language that would appeal directly to C programmers, the last thing I'd want to do is start array indices at 1 rather than 0. Sure, you have the option of altering this behavior in the constructor, but in the author's own words:

"I do not recommend the use of arrays starting at 0 in Lua. Most built-in functions assume that arrays start at index 1, and therefore they will not handle such arrays correctly."

Talk about giving you just enough rope to hang yourself. But it gets even better. Array elements in Lua are to be removed by assigning their indices the value of nil. This is all well and good, but, again in the author's own words:

"Lua uses [the nil] value as a sentinel to find the end of the array. When the array has holes--nil elements inside it--the length operator may assume any of these nil elements as the end marker. Of course, this unpredictability is hardly what you want."

No shoot, Sherlock. So why not get rid of that unpredictability? As I read further I came to the conclusion that this decision was made because doing otherwise would spoil the running theme of the language. Another favorite passage comes from page 32 when discussing the numeric for loop:

"you should never change the value of the control variable: the effect of such changes is unpredictable."

Great! I love unpredictable results. They make so much more sense than raising a predictable exception or pointing out a predictable old syntax error. Let's see now... How else can we anger C programmers? How about if we make it so "a break or return statement can appear only as the last statement of a block"? Wonderful! Now let's get rid of one of the primary attractions of high-level scripting languages--regular expressions--and say we can't include them due to size concerns (we really need to be able to brag about our entire distribution fitting on a single floppy disk, and the PCRE library is just HUGE).

These things are marginally less obnoxious than Python's significant whitespace, but still obnoxious, and apart from the multiple return values thing, I really didn't find any compelling reason to join the Lua fanboy camp in this volume. Maybe if I were a Warcraft player I'd feel differently.

As for the book itself, the writing is terse and very obviously coming from a non-native speaker. The typesetting is atrocious (good typography is one of those things you never really appreciate until it's gone) and the entire thing looks like it was printed on an old laser printer that was low on toner at Kinko's. If it were cheaper, I wouldn't care, but it's not, so I do.

Stick to the free PDF if you really have to learn Lua for something. The changes in 5.1 are not significant enough to warrant a second edition, and the flimsy, smudged paper is really not worth paying for.

Summary of Programming in Lua, Second Edition

Lua is the language of choice for anyone who needs a scripting language that is simple, efficient, extensible, portable, and free. Currently, Lua is being used in areas ranging from embedded systems to Web development and is widely spread in the game industry, where knowledge of Lua is an indisputable asset. "Programming in Lua" is the official book about the language, giving a solid base for any programmer who wants to use Lua. Authored by Roberto Ierusalimschy, the chief architect of the language, it covers all aspects of Lua 5---from the basics to its API with C---explaining how to make good use of its features and giving numerous code examples. "Programming in Lua" is targeted at people with some programming background, but does not assume any prior knowledge about Lua or other scripting languages. This Second Edition updates the text to Lua 5.1 and brings substantial new material, including numerous new examples, a detailed explanation of the new module system, and two new chapters centered on multiple states and garbage collection.

Languages & Tools Books

Book Subjects
Most talked about in Languages & Tools Books
Eclipse Plug-ins (3rd Edition) ImageEclipse Plug-ins (3rd Edition)
by Eric Clayberg, Dan Rubel
Addison-Wesley Professional; Published: 2008-12-21; Paperback; Book
Best price: $38.33
Price in other shops: $59.99
Java Software Solutions: Foundations of Program Design (6th Edition) ImageJava Software Solutions: Foundations of Program Design (6th Edition)
by John Lewis, William Loftus
Addison Wesley; Published: 2008-03-07; Paperback; Book
Best price: $74.40
Price in other shops: $128.00
C++ Primer (3rd Edition) ImageC++ Primer (3rd Edition)
by Stanley B. Lippman, Josée Lajoie
Addison-Wesley Professional; Published: 1998-04-02; Paperback; Book
Best price: $14.47
Price in other shops: $49.99
Accelerated C++: Practical Programming by Example ImageAccelerated C++: Practical Programming by Example
by Andrew Koenig, Barbara E. Moo
Addison-Wesley Professional; Published: 2000-08-24; Paperback; Book
Best price: $26.99
Price in other shops: $49.99
Patterns of Software: Tales from the Software Community ImagePatterns of Software: Tales from the Software Community
by Richard P. Gabriel
Oxford University Press, USA; Published: 1998-05-28; Paperback; Book
Best price: $64.55
Just Java? 2 (6th Edition) ImageJust Java? 2 (6th Edition)
by Peter van der Linden
Prentice Hall; Published: 2004-07-01; Paperback; Book
Best price: $35.00
Price in other shops: $64.99
UML for Java? Programmers ImageUML for Java? Programmers
by Robert C. Martin
Prentice Hall; Published: 2003-06-06; Paperback; Book
Best price: $22.99
Price in other shops: $44.99
Thinking in Java (3rd Edition) (One-Off) ImageThinking in Java (3rd Edition) (One-Off)
by Bruce Eckel
Prentice Hall PTR; Published: 2002-12-06; Paperback; Book
Best price: $13.80
Price in other shops: $54.99
SQL Fundamentals with CDROM ImageSQL Fundamentals with CDROM
by John J. Patrick
Prentice Hall; Published: 1999-05-11; Paperback; Book
Best price: $12.00
Price in other shops: $44.99
C How to Program, 2nd Edition ImageC How to Program, 2nd Edition
by Paul J. Deitel
Prentice Hall; Published: 1994-01-13; Textbook Binding; Book
Best price: $25.84
Price in other shops: $70.00
Similar Books and other products
Python Essential Reference (4th Edition) ImagePython Essential Reference (4th Edition)
by David M. Beazley
Addison-Wesley Professional; Published: 2009-07-19; Paperback; Book
Best price: $24.74
Price in other shops: $49.99
Mathematics for 3D Game Programming and Computer Graphics, Third Edition ImageMathematics for 3D Game Programming and Computer Graphics, Third Edition
by Eric Lengyel
Course Technology PTR; Published: 2011-06-02; Hardcover; Book
Best price: $34.95
Price in other shops: $69.99
Objective-C Programming: The Big Nerd Ranch Guide (Big Nerd Ranch Guides) ImageObjective-C Programming: The Big Nerd Ranch Guide (Big Nerd Ranch Guides)
by Aaron Hillegass
Addison-Wesley Professional; Published: 2011-10-28; Paperback; Book
Best price: $19.24
Price in other shops: $39.99
Game Engine Architecture ImageGame Engine Architecture
by Jason Gregory
A K Peters; Published: 2009-07-10; Hardcover; Book
Best price: $55.21
Price in other shops: $65.00
Programming Game AI by Example ImageProgramming Game AI by Example
by Mat Buckland
Jones & Bartlett Publishers; Published: 2004-09-30; Paperback; Book
Best price: $22.33
Price in other shops: $49.95
Lua Programming Gems ImageLua Programming Gems
Lua.org; Published: 2008-12-01; Paperback; Book
Best price: $29.45
Price in other shops: $44.90
Lua 5.1 Reference Manual ImageLua 5.1 Reference Manual
by Roberto Ierusalimschy, Luiz Henrique de Figueiredo, Waldemar Celes
Lua.org; Published: 2006-08-30; Paperback; Book
Best price: $12.87
Price in other shops: $19.98
World of Warcraft Programming: A Guide and Reference for Creating WoW Addons ImageWorld of Warcraft Programming: A Guide and Reference for Creating WoW Addons
by James Whitehead II, Rick Roe
Wiley; Published: 2010-02-08; Paperback; Book
Best price: $16.79
Price in other shops: $49.99
Beginning Lua with World of Warcraft Add-ons ImageBeginning Lua with World of Warcraft Add-ons
by Paul Emmerich
Apress; Published: 2009-07-29; Paperback; Book
Best price: $1.20
Price in other shops: $34.99
Beginning Lua Programming (Programmer to Programmer) ImageBeginning Lua Programming (Programmer to Programmer)
by Kurt Jung, Aaron Brown
Wrox; Published: 2007-02-12; Paperback; Book
Best price: $21.43
Price in other shops: $39.99