[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 18:59:37 +0200
2014-08-19 18:48 GMT+02:00 Dirk Laurie <dirk.laurie@gmail.com>:
> Roberto's most recent idea [1], which has received only approval so
> far, is to let the iteration still bail out, like the raw-access ipairs did,
> when the value is nil. If you want that to be the only way of stopping,
> __len can simply return math.maxinteger.
Oops, did not read that properly. The idea says "first nil after #t"
so you need __len to return 0 to iterate to the first actual nil. This
is not the idea that I and others have applauded :-(