lua-users home
lua-l archive

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


On 27/06/2011 18.05, Luiz Henrique de Figueiredo wrote:
I must nevertheless admit that the description for assert is slightly vague:

"Issues an error when the value of its argument v is false (i.e., nil or
false);..."

I'll suggest to change it to:

"Calls the function 'error' when the value of its argument v is false
(i.e., nil or false);..."

This wording is misleading because assert does not call error.

Oh, thank you for correcting me.

> In particular,
the wording you suggest may induce the user to think that if the error function
is redefined then the new definition will be used by assert, which is not true.


Ok. My bad! I didn't take this possible misinterpretation into account. :-(

Nevertheless, I'm still convinced that a few words about "assert" being part of the "standard" error management framework of Lua could be very useful.



Cheers
-- Lorenzo