lua-users home
lua-l archive

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


On Thu, Apr 10, 2014 at 7:26 PM, Javier Guerra Giraldez
<javier@guerrag.com> wrote:
> a real tuple type, with destructuring assingments, would solve all
> this in a simple and transparent way.

It's true - we're faking it with varargs.  But the cost of elegance
here is efficiency. Like the old joke about Lisp programmers knowing
the value of everything and the cost of nothing.

What I like about Moonscript's destructuring assignments is that you
can never mistake them for regular assignments:

{a,b,c} = t

Explicit is good, and sometimes elegance must take a back seat...

> you're using LuaJIT and Mike's magic banishes all those temporary
> objects from existence)

On a good day ;)