lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Jul 21, 2016 at 1:21 PM, Oliver Kroth <oliver.kroth@nec-i.de> wrote:
> Hi all
>
> I agree with Ulrich. Strongly.
>
> I have to switch a lot between Lua and JavaScript, and their table/array
> implementations.
>
> And I have to say, I do favour the Lua implementation, where there is only
> one data structure covering both, and especially only one literal to
> initialize it. Makes storing data much easier!
>
> If people need an iterator that jumps over holes when enumerating the array
> part, why don't they make one?
> Shouldn't be too complicated to make an inverse index table and use this in
> a closure.

Perhaps posting an example for people to follow would help lessen some
of the "noise"? I've written some neat stuff in Lua but would have no
clue how to move forward with your suggestion. Maybe the people making
the noise aren't as experienced as you are?

However, to support your argument that this does not belong in the
base library, I have found that external packages are almost *more*
important than the base because Lua is so lean (which I think is a
good thing).

Russ

> another 2 cents.
>
> --
>
> Oliver
>
>
>
> Am 21.07.2016 um 20:27 schrieb Ulrich Schmidt:
>>
>> I cant follow all the complains about table handling. If i know how tables
>> work ( and they work well from my point of view) then i write my own code
>> in a
>> way my code keeps working. For me it looks like, people want to go from
>> here
>> to there in a shortest way but there is a wall between. Now i can complain
>> about the wall again and again or i find the door in the wall and go thru
>> the
>> door. The way to walk may be a little bit longer but i reach my
>> destination.
>
>