lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> Really?  I use this to validate config entries: entry, err = get_value(‘my_bool’).  Entry is either true, false or nil if the user didn’t specify a value or gave an erroneous value.  Why is that a bad idea?

I have encountered this frequently in Lua code. i.e. nil representing
"no value"
Also common is set_something(nil) meaning to use the default.