mattias at virtutech.se
Wed Mar 14 16:58:08 CET 2007
"Patrick Maupin" <pmaupin at gmail.com> writes:
>That's a great idea all the way around. Another possible syntax would
>be 1101 at 2, 1234 at 8, etc. I don't think that could mean anything
It's a terrible idea all the way around. Be reasonable: in modern
code, only decimal, hex and binary constants are of general use at all.
Anything else is very much special-purpose code.
I have heard users of languages that use a general number base
notation (16#fce2# in Ada and the similar syntax in Erlang) complain
about how this buys them nothing compared to the much nicer 0x...
syntax of Python and C for the bases that people actually use.
I have frequently wanted binary constants when doing actual
programming in Python - the 0b1101 syntax would certainly be handy.
Perl allows it, but I hope that is not an argument against it - it
would be even more useful in Python.
More information about the Python-3000