This time we chat to Prof. Roberto Ierusalimschy about the design and development of Lua. Prof. Ierusalimschy is currently an Associate Professor in the Pontifical Catholic University of Rio de Janeiro's Informatics Department where he undertakes research on programming languages, with particular focus on scripting and domain specific languages.
Prof. Ierusalimschy is currently supported by the Brazilian Council for the Development of Research and Technology as an independent researcher, and has a grant from Microsoft Research for the development of Lua.Net. He also has a grant from Finep for the development of libraries for Lua.
Please note that due to popular demand we are no longer following alphabetical order for this series. If you wish to submit any suggestions for programming languages or language authors you would like to see covered, please email firstname.lastname@example.org.
What prompted the development of Lua? Was there a particular problem you were trying to solve?
In our paper for the Third ACM History of Programming Languages Conference we outline the whole story about the origins of Lua.
To make a long story short, yes, we did develop Lua to solve a particular problem. Although we developed Lua in an academic institution, Lua was never an "academic language", that is, a language to write papers about. We needed an easy-to-use configuration language, and the only configuration language available at that time (1993) was Tcl. Our users did not consider Tcl an easy-to-use language. So we created our own configuration language.
How did the name Lua come about?
Before Lua I had created a language that I called SOL, which stood for "Simple Object Language" but also means "Sun" in Portuguese. That language was replaced by Lua (still nameless at that time). As we perceived Lua to be "smaller" than Sol, a friend suggested this name, which means "moon" in Portuguese.
Were there any particularly difficult problems you had to overcome in the development of the language?
No. The first implementation was really simple, and it solved the problems at hand. Since then, we have had the luxury of avoiding hard/annoying problems. That is, there have been many problems along the way, but we never had to overcome them; we have always had the option to postpone a solution.
Some of them have waited several years before being solved. For instance, since Lua 2.2, released in 1995, we have wanted lexical scoping in Lua, but we didn’t know how to implement it efficiently within Lua's constraints. Nobody did. Only with Lua 5.0, released in 2003 did we solve the problem, with a novel algorithm.
What is the most interesting program that you've seen written with Lua and why?
I have seen many interesting programs written in Lua, in many different ways. I think it would be unfair to single one out. As a category, I particularly like table-driven programs, that is, programs that are more generic than the particular problem at hand and that are configured for that particular problem via tables.