[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Upcoming changes in Lua 5.4
- From: Sean Conner <sean@...>
- Date: Sat, 20 Jan 2018 16:46:31 -0500
It was thus said that the Great Benoit Germain once stated:
> 2018-01-20 10:43 GMT+01:00 Paige DePol <lual@serfnet.org>:
>
> > Sean Conner <sean@conman.org> wrote:
> >
> > > Why not the following?
> > >
> > > function foo(...)
> > > for i = 1 , #... do
> > > print("the answer is",...[i])
> > > end
> > > end
> >
> >
> > As you stated, if the vargs are needed in a table simply using "..." in
> > a table constructor could also be used.
> >
> >
> IIR I proposed a patch in that spirit that a while back. Maybe list history
> can unearth it. Wasn't production ready though, my knowledge of Lua
> internals wasn't good enough.
The thread starts here:
http://lua-users.org/lists/lua-l/2011-05/msg00034.html
Interesting discussion. It appears that PUC took HyperHacker's idea for
_ARG. There are also some issues brought up in
http://lua-users.org/lists/lua-l/2011-05/msg00107.html
-spc