[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua 5.4-work1 with first class arrays (implementation & benchmarks)
- From: Dirk Laurie <dirk.laurie@...>
- Date: Wed, 28 Mar 2018 11:46:59 +0200
2018-03-28 9:35 GMT+02:00 pocomane <pocomane_7a@pocomane.com>:
> If # for table is removed, I probably will re-implement it by myself.
> The point is: I often found the current # behaviour very useful, not
> something to fight against. E.g. I can write `t[1+#t]=x` and be sure
> that the `x` is added in a free space!
I have often wished that table.border was available so that I could
use it to protect myself against __len metamethods.
I don't see the point of first class arrays whose elements are general
Lua values. You don't get enough extra speed. It optimizes at the
wrong place.
I do see the point of arrays of bytes, or two-byte Unicode characters,
or of floating-point numbers, etc, but those would be userdata, not
tables. Using the same method names as the string and/or table
libraries would of course be a sensible thing to do.
- References:
- Lua 5.4-work1 with first class arrays (implementation & benchmarks), Petri Häkkinen
- Re: Lua 5.4-work1 with first class arrays (implementation & benchmarks), Egor Skriptunoff
- Re: Lua 5.4-work1 with first class arrays (implementation & benchmarks), Petri Häkkinen
- Re: Lua 5.4-work1 with first class arrays (implementation & benchmarks), Egor Skriptunoff
- Re: Lua 5.4-work1 with first class arrays (implementation & benchmarks), Petri Häkkinen
- Re: Lua 5.4-work1 with first class arrays (implementation & benchmarks), Petri Häkkinen
- Re: Lua 5.4-work1 with first class arrays (implementation & benchmarks), Doug Currie
- Re: Lua 5.4-work1 with first class arrays (implementation & benchmarks), Eric Man
- Re: Lua 5.4-work1 with first class arrays (implementation & benchmarks), Petri Häkkinen
- Re: Lua 5.4-work1 with first class arrays (implementation & benchmarks), pocomane