lua-users home
lua-l archive

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


2014-04-09 17:56 GMT+02:00 Andrew Starks <andrew.starks@trms.com>:

> If huge or -(huge) were the result of (nil), I probably would not patch it
> and instead change the logic in my code to use the new result, but it
> doesn't sound like this would be correct.

>From the mathematical point of view, max() can only be defined if
(a) you know from what ordered set legal values come (b) that set
has a smallest element. The moment one allows max to accept any
ordered set, there is no useful value that max() can have — and nil
is designed for just that situation. But I would not like to distinguish
between max() and max(nil).