lua-users home
lua-l archive

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


> On 8 Oct 2019, at 13:15, Roberto Ierusalimschy <roberto@inf.puc-rio.br> wrote:
> 
> Any function where you have to distinguish between nil and false in the
> return value seems a very bad idea. The standard library always avoided
> that, and will continue to do so.


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?

Chris
—
Chris Smith <space.dandy@icloud.com>