lua-users home
lua-l archive

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


>One of the things I like about Awk is that
>all functions are compiled before interpretation
>starts. This means that the textual order of
>function definitions does not matter.
>Now that Lua is to be lexically scoped, has anybody
>considered the feasibility of adopting this strategy?

Lua *used* to be like that, in the early days, before it had anonymous
functions. Now, *all* functions in Lua are anonymous: "function f...end" is
simply sugar for "f=function...end". In other words, functions definitions
are not special constructs, simply assigments. So, what you propose is no longer
possible.
--lhf