lua-users home
lua-l archive

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


On Thu, May 8, 2014 at 5:35 PM, Philipp Janda <siffiejoe@gmx.net> wrote:
> Am 08.05.2014 17:24 schröbte Pierre-Yves Gérardy:
>> L="local a,b,c=..."load(L.."")load(L.."")
>> function(a,b,c)endfunction(a,b)end
>
>
> Yes, and we also rely on upvalues, so we would need the `function` keyword
> in there after all ...
> But for a moment it was a good idea.

No need for upvalues, a Lua chunck really is a vararg function:

    add = load"local a,b = ... return a + b"
    add(1,2) --> 3

—Pierre-Yves