lua-users home
lua-l archive

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


I would like to stay with that a function on error returns something that evaluates to nil, not false.

there are function returning a boolean value, which in case of failure need to return a third, distinct value. nil. Think of a function that for a file name returns whether it is a directory or not.

--
Oliver Kroth
For old libraries and functions, changing nil to false may cause
incompatibilites. New libraries and functions, however, are free
to use false instead of nil. The new function 'debug.setcstacklimit'
in the standard library does that.

-- Roberto