lua-users home
lua-l archive

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


> maybe ":" as single token, in NL kids at schools start with
> (positive) integers and the : is used as division symbol learn
> division (but anyway, // looks visually ok too)

":" is already taken in Lua. A "÷" would be perfect, though :)


> Does 1.0 represent an integer or float?

1.0 is a float, 1 is an integer.


> or is it:
> 
> 1.0 * 123 => float
> 1   * 123 => integer

Yes.


> just curious: what is the expected impact on memory and speed?

On memory the impact is that it would be difficult to use the NaN trick,
but that trick does not work already on 64-bit machines anyway. On speed
I hope it should have very little impact on float computations and could
speed up integer computations (?), but we need lots of tests.

-- Roberto