[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table.unpack(...) and the __index metamethod
- From: Dirk Laurie <dirk.laurie@...>
- Date: Sat, 14 Jun 2014 12:25:58 +0200
2014-06-14 8:27 GMT+02:00 Tim Hill <drtimhill@gmail.com>:
>
> Anyway, I’m not tied to this but I still think the OP had
> a good point. The Lua ref notes in a couple of places
> the raw accesses are done for speed, but he is correct
> in noting that you don’t need to sacrifice non-raw access
> for speed in this case.
>
The manual (which anyway refers you to other places for
the decisions behind the design of Lua) only says "For
performance reasons", true, but that is not the only reason.
You can't have one rule for concat and unpack and another
rule for insert, remove and sort. But for the mutable table
functions, semantics becomes a mare's nest unless you
have raw access.
- References:
- table.unpack(...) and the __index metamethod, Kalafut, Bennett
- Re: table.unpack(...) and the __index metamethod, Dirk Laurie
- Re: table.unpack(...) and the __index metamethod, Andrew Starks
- Re: table.unpack(...) and the __index metamethod, Tim Hill
- Re: table.unpack(...) and the __index metamethod, Thiago L.
- Re: table.unpack(...) and the __index metamethod, Tim Hill
- Re: table.unpack(...) and the __index metamethod, Thiago L.
- Re: table.unpack(...) and the __index metamethod, Tim Hill
- Re: table.unpack(...) and the __index metamethod, Coda Highland
- Re: table.unpack(...) and the __index metamethod, Tim Hill