[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Compatible coding: 'arg' in 5.1 vs 5.2
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 3 Jun 2011 12:47:53 +0200
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.