|
|
|
|
|
by amttc
3494 days ago
|
|
Yeah, I wish Lua hadn't taken undefined and nil to be the same thing given the way tables work in it. Most of the time it doesn't matter, thankfully. Sometimes you bump into it. A sigil value can work too if you absolutely need it. ex: undef = {}
function isundef(val)
return undef == val
end
The sigil value is truthy and makes your code more convoluted, though. ex: if not val or isundef(val) then -- ...
So, :/. I do love the language though. |
|