lua-users home
lua-l archive

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

On Tue, Sep 10, 2013 at 3:49 PM, William Ahern
<> 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.