Consider this test case.
function test()
return 1, 2, 3
end
-- OK: prints 4 1 2 3
print (4, test())
-- NOT OK: prints 1 4
print (test(), 4)
Why do values returned from a function in a function call expression (already pushed to stack) are discarded and narrowed down to a single one, when combined with another value on the right. While at the same time, nothing is discarded when combined with another value on the left.
Is it even possible to extend a set of values returned from a function call to the right, without resorting to table. Because tables have their own issues like counting size by first nil. While nil is a totally reasonable value to pass as function argument as well as return from function, along with some other values.
Subsequently, it's not even possible to do things like this:
local ret = {test()}
-- NOT OK: still prints 1 4
print (table.unpack(ret), 4)