4 ms·
I see you already know perfectly well that this doesn't correspond to what people mean by saving fields in a table.
by aasasd 6y ago
I see you already know perfectly well that this doesn't correspond to what people mean by saving fields in a table.
- samatman 6y agoYou seem to be frustrated that Lua doesn't work like one other programming language: Javascript. That's fine. Probably shouldn't use it. The nil handling is one of my favorite things about Lua, so let me offer you an alternative: instead of being grumpy about the language not working the way you'd like, instead embrace what it is, and work with it. Or don't, that's entirely your business.
- aasasd 6y agoOn the contrary, apparently you're unaware that a ton of languages and serialization formats have ‘null’. And there's nothing special about nil in Lua, it's just called ‘undefined’ in other dynamic languages (possibly with minor differences). Lua doesn't have a proper ‘null’. But yeah, this discussion is pointless since you're obviously not concerned either about the use-cases of exchanging data with languages that are not like C, or about keeping structures ‘schemaless’ in Lua code.