Closures in Lua

@inproceedings{Ierusalimschy2013ClosuresIL,
  title={Closures in Lua},
  author={Roberto Ierusalimschy and Luiz Henrique de Figueiredo and Waldemar Celes},
  year={2013}
}
First-class functions are a very powerful language construct and a fundamental feature in functional languages. However, few procedural languages support this feature, due to their stack-based implementation. In this paper we discuss a new algorithm for the implementation of first-class functions used in the implementation of Lua 5.x. Unlike previous… CONTINUE READING