lua-users home
lua-l archive

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


On Wed, Jun 15, 2011 at 4:03 PM, Benoit Germain <bnt.germain@gmail.com> wrote:
> closure as not adjustable? Default would be to adjust with the current
> rules, but if you don't want this, and you know what you are doing,
> then you can :-).

It's come up a few times, but I can't find the precise post.

In http://lua-users.org/wiki/LuaPowerPatches

Look for "Extend table constructor syntax to allow multiple expansion
of multireturn functions"

"With this patch, {foo(); bar()} creates a table with all the return
values of foo followed by all the return values of bar, while {foo(),
bar()} continues to have the same semantics as current Lua. "

I've also seen {foo()...,bar()} suggested as a syntax, which is better
IMHO because semi-colons are usually just alternative list separators.

steve d.