4 ms·
I'm not going to complain about the indexing but I am going to complain about tables. The fact that you need at least one element to be in a table to trigger he
by clhodapp 3y ago
I'm not going to complain about the indexing but I am going to complain about tables. The fact that you need at least one element to be in a table to trigger heuristics to serialize it properly makes Lua uniquely bad for use in polyglot distributed systems.
I've specifically run into this with OpenResty and JSON processing...
- openrestysux 3y ago[flagged]
- nurettin 3y agoI would avoid trying to serialize tables in polyglot systems since it sounds like a specialized data structure whose counterparts don't really exist in other languages anyway.
- clhodapp 3y agoIt's a specialized data structure that the whole Lua ecosystem drives you to use as your primary collection type. They're blessed by the language, every library function will use will take and return them, and your deserializer will produce them, whether you like it or not. Ultimately, you can use different data structures in Lua... but you'll have to write reams of boilerplate to do it. That's why I'm saying that (unfortunately) it's Lua itself that's a bad fit, not just tables.