On 4/3/2011 12:12 AM, Russel Winder wrote:
On Sat, 2011-04-02 at 18:36 -0700, Walter Bright wrote:

Yes, except for something else - the rarity of need for octal literals. The only
modern usage I've seen of it is for file permissions.

What is the use for binary literals or hexadecimal literals, I can't
think of one.

Except perhaps specification of register save masks and control status
work literals -- which is of course where the octal stuff came from in
the first place in C and when the VAX replaced PDP, hexadecimal was
rapidly introduced. (*)

I still prefer binary for that. It takes me a senior moment or two to remember what bit pattern 0xB is, for example.


I would suggest that rather than discriminating against people who like
octal

The phrase "discriminating against people" has a lot of emotional baggage associated with it that is irrelevant to this.


instead of decimal or hexadecimal, the solution of introducing
0o... in harmony with 0b... and 0x... -- and of course removing the
leading 0 octal literal convention -- is obviously the right solution.
It ticks all the boxes.

Except the box of a kitchen sink of features of marginal utility. A feature that can be handled adequately by the library should not be part of the core language.

And yes, you can make a reasonable case that 0b should be ditched for the same reason.

Reply via email to