O'Reilly logo

Functional Programming: A PragPub Anthology by Michael Swaine

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 26A Functional Approach to Lua

by Josh Chisholm

If you write code in mainstream programming languages, you might never have heard of Lua. But I bet you’ve heard of Angry Birds, Wikipedia, or World of Warcraft. So what made their developers use Lua in those mainstream products? Perhaps it’s because Lua is lightweight, cross-platform, embeds and extends well, performs well, and has a small memory footprint and a shallow learning curve. Those are good reasons. But I’d like to believe that some developers are attracted to Lua because it supports different paradigms and includes some pretty sweet functional programming capabilities.

You probably know some JavaScript. Although Lua has quite a different heritage, it shares many design ideas ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required