4 ms·
This is one of the things i was talking about. You cannot map nil to a key because nil means absence. The compiler can only infer such absence at a control flow
by caligian 3y ago
This is one of the things i was talking about. You cannot map nil to a key because nil means absence. The compiler can only infer such absence at a control flow level aka passing arguments to functions or checking nil-variables. You are supposed to use false in such a case here
- srhtftw 3y agoTo me this is a serious flaw and I simply refuse to accept that it's beyond criticism. No language should allow its collections to be corrupted this easily. Especially when a key use of the language is configuring other software. Fortunately there are other configuration languages available now besides Lua which provide type checking, so I remain hopeful that a future version of Lua or one of the newer typed Lua variants will eventually learn from those.