lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On Apr 7, 2007, at 1:21 PM, Joe Krahn wrote:

Due to the way Lua handles functions, wouldn't it be more accurate to call a function body a function constructor instead of a function definition?

Lua's way of handling functions is not that different from the way other languages handle it, like Algol 60, Algol 68, Simula, Lisp, Scheme, _javascript_ etc. In those languages we don't call function definitions 'function constructors', so it would be confusing to start doing it for Lua.

What 'evaluating' a function does is build a closure, an object that binds the function's code to its environment. So you could call then 'closure constructors', I guess.

Gé Weijers