lua-users home
lua-l archive

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


On Thu, Mar 1, 2012 at 4:22 PM, Mark Hamburg <mark@grubmah.com> wrote:
> ... It helps with things like "make a field extractor for the field foo" which is probably easier to read and write as something like "\x(x.foo) than as "function_utils.extractor 'foo'" since one only has to know a little syntax for the former v knowing a library for the latter. But ...

It feels like premature optimization - people should be allowed to
write slow code, and thereafter (if needed) optimize it; Lua 5.2 is
already optimizing closure creation.

Actually the 'make a field extractor for foo' is a good example of how
sometimes a little lambda is easier to write and read than a library
function.

steve d.

(still seriously embarrassed about bombarding lua-l with nonsense all
these years)