[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lambda (was Re: special forms, take two (was Re: A lua version of "amb"))
- From: steve donovan <steve.j.donovan@...>
- Date: Thu, 1 Mar 2012 18:22:28 +0200
On Thu, Mar 1, 2012 at 4:22 PM, Mark Hamburg <firstname.lastname@example.org> 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
(still seriously embarrassed about bombarding lua-l with nonsense all