lua-users home
lua-l archive

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


On 03/23/2014 10:53 PM, Are Leistad wrote:
> Regarding the specifiaction of the base for numeric constants, some
> tools I've used in the past had the following, quite clean and
> readable, notation:
>
> <base>_<number>
>
> e.g. 2_10101010 , 16_A9 etc.
>
> Perhaps something worth considering for the 'number oriented' 5.3?
>
> Are

That's not really readable. Also what happens if you specify a base
higher than 36?

IMO we are fine with just decimals and hexadecimals. I don't really
think binary literals are that much of a need, as it's trivial to
translate hexadecimal to binary and back. Even C with their binary flags
all over the place don't use any binary literals. Arbitrary base
literals would be an overkill of useless-ness.