[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ipairs in Lua 5.3.0-alpha
- From: Dirk Laurie <dirk.laurie@...>
- Date: Tue, 19 Aug 2014 09:36:41 +0200
2014-08-18 21:23 GMT+02:00 Jan Behrens <jbe-lua-l@public-software-group.org>:
>
> My main proposal is to allow ipairs to be used as a general
> interface for (ordinal) iteration.
> ...
> If ipairs(...) accepted a function or an iterator triplet (which it
> currently doesn't do in Lua 5.3-alpha), then ...
Aha! Finally you have put it in a way that penetrates my thick
and lazy skull.
Well, your proposal is one for which PUC approval is not needed,
since a simple `ipairs=require"supercool_ipairs"` with an appropriate
supercool_ipairs.lua in the module path will do it. (In fact, a similar
comment applies to anything in the standard libraries.)
Will I use it? It depends. If PUC continues with its intention of
(a) removing __ipairs (b) making ipairs essentially equivalent to an
iteration that can easily be coded in just the language, I might.
In any case, I could still say `jpairs=require"supercool_ipairs"`
Either way, if you make your extension available as a rock, the
decision to use it will be easier to make.
- References:
- Speed of # operator (Was: ipairs in Lua 5.3.0-alpha), Dirk Laurie
- Re: ipairs in Lua 5.3.0-alpha, Roberto Ierusalimschy
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens
- Re: ipairs in Lua 5.3.0-alpha, Doug Currie
- Re: ipairs in Lua 5.3.0-alpha, Coda Highland
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens
- Re: ipairs in Lua 5.3.0-alpha, Andrew Starks
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens
- Re: ipairs in Lua 5.3.0-alpha, Dirk Laurie
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens
- Re: ipairs in Lua 5.3.0-alpha, Dirk Laurie
- Re: ipairs in Lua 5.3.0-alpha, Jan Behrens