[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Upcoming changes in Lua 5.4
- From: Michael Nelson <mikestar1313@...>
- Date: Tue, 2 Jan 2018 09:21:38 -0800
On 1/2/2018 6:18 AM, Roberto Ierusalimschy wrote: ...
I just love the new syntax. I assume select will continue to work as
usual, for old code and for use cases where it works better. The _ARG
name makes the parameter name for the main chunk consistent with Lua
_NAME practice, a good change. Any code broken by this last change
should be an easy fix: a simple search and replace.
As already explained, you can use _ARG; but you can use also any other
function foo (...=a) print(a.n) end
_ARG is present both for compatibility (the above syntax will not even
compile in older versions) and for the main chunk (which does not have
a header to name this parameter).