[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: Mon, 18 Aug 2014 08:02:01 +0200
2014-08-17 23:53 GMT+02:00 Jan Behrens <jbe-lua-l@public-software-group.org>:
> Still looking forward to feedback.
I don't like it. I don't like Lua 5.3.0-alpha ipairs either.
What you, and Lua 5.3.0-alpha, have been trying to do
is to second-guess what semantics ipairs should have
if a programmer has been tinkering with __len and __index.
And Lua 5.3.0-alpha is so prescriptive about it that the
programmer does not even have the freedom to override
that guess.
I think _any_ iterator that is metatable-aware must either
be very explicitly specified (e.g. by __pairs or __ipairs)
or stashed in the table library, which can have its own tight
well-specified protocol.
- References:
- Speed of # operator (Was: ipairs in Lua 5.3.0-alpha), Dirk Laurie
- Re: Speed of # operator (Was: 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, 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