[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: ipairs in Lua 5.3.0-alpha
- From: Tim Hill <drtimhill@...>
- Date: Sun, 3 Aug 2014 12:33:38 -0700
On Aug 3, 2014, at 11:44 AM, Dirk Laurie <dirk.laurie@gmail.com> wrote:
> 2014-08-03 17:55 GMT+02:00 Roberto Ierusalimschy <roberto@inf.puc-rio.br>:
>>> I made a little experiment. The present behaviour is that if you
>>> do not override __len, ipairs still chickens out a soon as a nil
>>> value is encountered. It does not do what the manual says.
>>
>> I think the manual does not say what 'ipairs' should do in this case.
>
> OK, I should have phrased that sentence as "It does what the
> manual does not say."
>
> But I think you know what I mean. The code does something
> not documented in the manual, and what it does is sensible
> enough that the manual should document it.
>
+1 to this.
Is it me, or is the metamethod model in Lua getting more complicated (as opposed to complex)?
—Tim