|
(The semantics is that __ipairs, if present, is called and its result is the final result of ipairs. So __ipairs is not called on each iteraction; it is called before the loop to return an iteraction function.)
Supposedly this means the pairs/ipairs calls are still used? for i in pairs(blah) do ... for i in ipairs(blah) do ...Or might the goal be to get rid of them, once __pairs and __ipairs are added?
for i in blah do ...(seems more intuitive to me, i.e. blah responds to an iteration protocol, being "__pairs")
Not sure about implicit ipairs though - perhaps with a new notation? for i in *blah do ... Hmm, I don't quite grasp the role of ipairs, when there is also for i=1,#blah do ...(and I still think "for i=f() do ..." could be a useful way to supply non-standard bounds)
-jcw