lua-users home
lua-l archive

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

Adrien de Croy <> writes:
> I wonder if there's some reason no other language (that I know of
> anyway) allows more than one return value for a function.

Actually a huge number of languages allow multiple return values.

Some are "flexible" as in Lua -- automatically discarding or supplying
RVs as necessary to fit what the caller asked for -- and some are
"rigid" in that the number of returned values must exactly match what
the caller asked for (or the caller must explicitly use some mechanism
to handle unexpected/unsupplied values).


Love is a snowmobile racing across the tundra.  Suddenly it flips over,
pinning you underneath.  At night the ice weasels come.  --Nietzsche