[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.4.0 (work1), undef and metatable
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 15 Mar 2018 15:47:41 -0300
>
>
> On 2018-03-14 11:35 AM, Roberto Ierusalimschy wrote:
> >>2018-03-14 12:43 GMT+03:00 Daurnimator <quae@daurnimator.com>:
> >>>On 14 March 2018 at 20:38, Sergey Zakharchenko <doublef.mobile@gmail.com> wrote:
> >>>>No metamethod calls occur for the undef assignment and check. This
> >>>>doesn't seem right.
> >>>I think I saw a __undef introduced?
> >>How would the supposed backwards compatibility be kept if existing
> >>code doesn't define __undef/__isdef?
> >You are right. We still do not get full backwards compatibility, because
> >of metamethods. We will try to correct it.
>
> For __newindex = check if select("#", ...) == 2 instead of == 3
We thought about that, but it is kind of ugly this use of varargs and
select. Maybe a fourth parameter?
> For __index = check if select("#", __index()) == 0 instead of == 1?
??
-- Roberto
- References:
- Lua 5.4.0 (work1), undef and metatable, Sergey Zakharchenko
- Re: Lua 5.4.0 (work1), undef and metatable, Daurnimator
- Re: Lua 5.4.0 (work1), undef and metatable, Sergey Zakharchenko
- Re: Lua 5.4.0 (work1), undef and metatable, Roberto Ierusalimschy
- Re: Lua 5.4.0 (work1), undef and metatable, Soni "They/Them" L.