[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc1) now available
- From: David Kastrup <dak@...>
- Date: Tue, 14 Jun 2011 21:42:19 +0200
Dirk Laurie <dpl@sun.ac.za> writes:
> On Tue, Jun 14, 2011 at 06:05:17PM +0200, Florian Weimer wrote:
>> * Xavier Wang:
>>
>> > in beta:
>>
>> | The length of a table t is only defined if the table is a
>> | *sequence*, that is, all its numeric keys comprise the set *{1..n}*
>> | for some integer *n*. In that case, *n* is its length.
>>
>> So it is no longer advisable to store something in t[0] if you want to
>> use #t? Would it be possible to change that to "positive numeric
>> keys", at least?
>>
> The present implementation makes #t well-defined and equal to n if all
> its positive integer keys comprise the set {1..n}. That would not be
> a problem.
You are using "present implementation" and "well-defined" in a
nonsensical combination. It's like trying to have your cake recipe and
eat it too. You can change a definition without changing the
implementation (by changing the scope of undefined behavior), and you
can change the implementation's behavior without changing the definition
(by changing undefined behavior to a different undefined behavior).
--
David Kastrup
- References:
- [ANN] Lua 5.2.0 (beta-rc1) now available, Luiz Henrique de Figueiredo
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Peter Cawley
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Roberto Ierusalimschy
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Lorenzo Donati
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Lorenzo Donati
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Xavier Wang
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Lorenzo Donati
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Xavier Wang
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Florian Weimer
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Dirk Laurie