lua-users home
lua-l archive

Re: Trailing commas in argument & parameter lists patch

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


Technically, that's not exactly semantically equivalent since "nil"
isn't the same as the empty vararg. As you have already pointed out,
it's also not exactly beautiful - which is what this tiny syntactic
change is all about :)
On 28.02.23 22:31, Javier Guerra Giraldez wrote:
On 2023年2月28日 at 20:40, Lars Müller <appgurulars@gmx.de> wrote:
which would benefit from a trailing comma (which should also be added for consistency with the trailing comma in arglists):
function f(
a, -- a comment for a
b, -- a comment for b
)
...
end
what about:
function f(
 a, -- a comment for a
 b, -- a comment for b
nil)
(i'll be the first to accept that it looks weird)

AltStyle によって変換されたページ (->オリジナル) /