lua-users home
lua-l archive

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


On Fri, Jun 3, 2011 at 12:25 PM, Dirk Laurie <dpl@sun.ac.za> wrote:
> Which is better?

I would say: avoid the local 'arg' like the plague, it's a Lua 5.0 -ism ;)

It is both ugly and inefficient, e.g.

function bind1st(val,fun)
  return function(...)
    return fun(val,...)
  end
end

would be a lot less efficient with arg.

Granted, '...' has its own set of issues but we can deal with them.

steve d.