lua-users home
lua-l archive

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


I don't expect valid results from invalid code.; I just hope for
meaningful errors.
If your comparison function crashes (and it probably will, because of
the unexpected nil argument), you'll never get the helpful 'invalid
order function for sorting', but a 'trying to index nil' or sth. like
that.
Result: You'll look for the wrong kind of error in the wrong place.

If Lua knows that my comparison function is flawed (and it most
obviously does), it should tell me just that, instead of pestering my
poor function with bogus arguments just to see what happens.