[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Operators on functions
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 21 Nov 2013 10:59:02 +0200
On Wed, Nov 20, 2013 at 4:08 PM, Fabien <email@example.com> wrote:
> I think it would be more idiomatic to have it replace the table's content
> in-place, leaving it up to the caller to copy the table or not before
> modifying it. But then we face a recurring problem: it's surprisingly hard
> to agree on a general proper way to copy a table in Lua.
Oh yes, I remember when we all tried ;)
But (just as a data point) it's amazing what LuaJIT can do with code
that any Lua programmer would see as 'inefficient'.
For instance, have a look at Lua Fun:
Will work on stock Lua (with one small change). But the generated
machine code for that 'functional' expression is most impressive.
Whether it is more _readable_ I leave as another question...