lua-users home
lua-l archive

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


On Wed, Jan 9, 2013 at 7:18 PM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> Unless `lambda` is used inside a loop that will be executed
> millions of times, the execution penalty compared to
> a patch is negligible.

And memoization makes it even cheaper. (The implicit functions in
Microlight like 'X+Y' work like this).

But they are not closures and can only see the table they were born in
(usually _G)

Patching is a perfectly good solution for a game scripting
environment, I would think, provided you don't add too many patches
and confuse people.

steve d.