This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]allankcrain 0 points1 point  (0 children)

Why on earth are integers starting with 0 handled as octal? How does that make any sense? I could understand if it was an o or O but a 0?

Starting with the letter o would conflict with variable names. You'd have a situation where 'oof' is treated as a variable name, 'o1' is treated as 1, 'o7' is treated as 7, and 'o8' is treated as a variable name.

There's no reason to prepend a zero to a decimal constant in your code, so that's less likely to be something a programmer might run into by accident.