lua-users home
lua-l archive

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


Lars:;

On Wed, 27 Jul 2022 at 15:17, Lars Müller <appgurulars@gmx.de> wrote:
> Agreed on the foot-shooting ability. Your example is somewhat wrong though: You wouldn't have to list them all. You could still truncate to the first return value by surrounding the expression in parenthesis:
> local fa, ga, gb = (f()), g()

What's the point, behind code golf, of using this instead of

local fa=f()
local ga, gb = g()

Which, IMNSHO, is much more readable and safe? ( and future proofed
against your mentioned potential API expansions ).

FOS.