[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Iterators vs Lambdas
- From: Javier Guerra Giraldez <javier@...>
- Date: Tue, 10 Sep 2013 16:33:20 -0500
On Tue, Sep 10, 2013 at 3:49 PM, William Ahern
<william@25thandclement.com> wrote:
> The former, iterator example is more composable. The caller can build on
> your API much easier, and things are less likely to break.
+1 on this. iterators are slightly more complex to write, but easier
to use in imperative languages.
just because closures are first-class values, it doesn't mean that Lua
is a Lambda-heavy language. imperative constructions are still
preferred, IMHO.
--
Javier