lua-users home
lua-l archive

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


On Fri, Sep 9, 2011 at 4:41 AM, Michael Richter <ttmrichter@gmail.com> wrote:
> Any language with native support for tuples (or equivalent constructs) can
> do multiple returns trivially, so this dates back to Lisp at least, which
> puts it as about 1959.

Ah, but there is an important difference: this code has the same
effect in Lua and Python:

    x,y = something()

but in Python there is an explicit tuple type and this multiple
assignment causes that tuple to be unpacked, which is a rather less
efficient process.

steve d.