|
|
|
|
|
by fifilura
741 days ago
|
|
But still maybe the concepts for working with them (group by/ join/ aggregate) are similar? There are lots of things you can do with a table as a general purpose data structure. And I was curious if this was a similarity? When you say that tables are like dicts/maps, are they tables or are they dicts? And I apologise for not knowing more about Lua. Maybe i should have known better than to ask about things I dont know. |
|
It is fine to not know things. But when I look at your post, I see that you didn't ask any question. You only made statements that were based on very unfounded assumptions.
But to get back to what tables are: They are key-value pairs with both array- and hashmap-semantics. By convention, arrays start at 1 in Lua. They are very similar to dictionaries in Python , associative arrays in JavaScript and other key-value data structures in other programming languages. However, lua also uses them for storing variables in environments (some people would call environment "scopes") and there are special callbacks for missing variables and accessor functions when working with these tables.