[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: named parameter optimization proposal
- From: steve donovan <steve.j.donovan@...>
- Date: Fri, 25 Feb 2011 08:53:07 +0200
On Fri, Feb 25, 2011 at 8:33 AM, David Manura <dm.lua@math2.org> wrote:
> sum(z=3*i, y=2*i, i)
> could be syntactic sugar for something like this:
> sum('z,y', 3*i, 2*i, i)
Yes, that makes sense, especially the point about fast lookup on the
various permutation strings.
It's definitely the kind of thing that the token-filter patch was
designed for; I've been getting re-interested in compile-time macros,
but this time not requiring an actual patch to the core - that is, use
a lexical scanner. require() can be monkey-patched so that if it
doesn't find 'mod.lua' it will look for 'mod.m.lua' and preprocess it.
(The motivation for this new interest was loop unrolling and constant
definition for LuaJIT, but this kind of thing can be done as well.)
steve d.