5 ms·
> And from my experience, it's way easier to model data with three simple structures; vectors (= arrays), maps and sets. So, Lua tables? ;)
by jakub_h 10y ago
> And from my experience, it's way easier to model data with three simple structures; vectors (= arrays), maps and sets.
So, Lua tables? ;)
- bsder 10y agoUnfortunately, Lua violates Commandment Zero: Thou shalt not index from one. :)
- jakub_h 10y agoThat may be fixable at compile time, I believe. In the worst case, you could write a patch. (Dijkstra would prefer a half-open indexing scheme anyway.)
- bsder 10y agoAnd be incompatible with the universe of Lua programs. The problem was that Lua reified 1-indexing into the language when they optimized to make arrays faster and then created length operators. At that point, 1-indexing got baked into the language.