lua-users home
lua-l archive

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


On 5 June 2014 17:03, Dirk Laurie <dirk.laurie@gmail.com> wrote:
2014-06-05 2:02 GMT+02:00 Hisham <h@hisham.hm>:
> But the argument of having math.max and math.min preserve integers
> (and their precision) has, in my opinion, a very strong case.
> (Especially since math.max and math.min _are_ convenience functions
> after all, so the "roll your own" answer does not apply.)

Maybe there is a case for taking them out of the math library
and putting them back into global, with `max(a,b)` meaning
exactly the same as "(b>a) and b or a" so that they will apply
to anything, particularly strings.


Note that max is max(...), not max(a, b).