lua-users home
lua-l archive

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


Hi,

As we have already discussed this, some of us on the lists think that
math.isfloat is great but should also reflect the opposite as
math.isinteger.

Joseph Manning and I thought this idea great as you only need to
remember there are math.is* to check the type. So you don't need to
think which one of the function is available.

This makes the library clear and adds a symmetry to the API.

However Thijs Schreijer also thougth about the functione type() that
should returns two values like this:

type(10) -> "number", "integer"
type(10.0) -> "number", "float"

This is not a bad idea, it will not break compatibility but adds a
second feature to determine the actual type of the integer. With this,
the discuss of keeping math.isfloat and adding math.isinteger will be
gone.

I just hope that one of these 2 solutions will be approved and added
for the final Lua 5.3

Regards,

--
Demelier David