Re: ipairs in Lua 5.3.0-alpha
[
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: 2014年8月18日 19:28:29 +0200
2014年08月18日 16:35 GMT+02:00 Jan Behrens <jbe-lua-l@public-software-group.org>:
> This just got me to the idea that if ipairs is made to accept
> functions (or even iterator triplets), we could also implement
> a generic concat:
>
> ==================================================
> function string.concat(sep, ...)
> local t = {}
> for i, v in ipairs(...) do
> t[i] = tostring(v)
> end
> return table.concat(t, sep)
> end
> ==================================================
...
> Can anyone come up with a real con?
Only that this was proposed two years ago [1] but the Lua team did not bite.
[1] http://lua-users.org/lists/lua-l/2012-07/msg00220.htm
- 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, Jan Behrens
- 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