> >>Date: Fri, 16 Mar 2018 11:44:31 -0400
> >>From: Peter Aronoff <[hidden email]>
>> >>pairs and ipairs were never supposed to be syntax, they are one of
>> >>number of possible implementations of iteration which were intended
>> >>extended by users and library authors.
> >>I'm sorry, but just to be clear: are you saying that every module
> >>should create their own custom iteration? That seems like a huge
> >>even if we all agree that itâ€™s a strength of Lua that you *can*
> >>write your own custom iterators.
I do not understand your point. We are talking about the utility of the
"__ipairs" metamethod. To use that you effectively have to write another
function that does what "ipairs" does but differently (if it does it the
same, you do not need the metamethod). So it is no more effort to
present that function as a method or as a function in the library.
Of course the need for ipairs itself is also debatable (and has
frequently here been debated!).