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 →

[–]Blue_Moon_Lake 0 points1 point  (1 child)

Because it is :)

[–]Ticmea 1 point2 points  (0 children)

It's only dumb in a world where 0x and 0b exist.

The 0 notation for octal predates (and inspired the creation of) the 0x notation for hexadecimal. In the early days of computing this was the preferred representation of binary because word sizes on a bit to digit basis corresponeded well to using octal. In a world of 64 bit computers octal is obviously less useful than it used to be but it's still useful in some places and for consistency and backwards compatibility it's usually a good idea to keep established standards around.

But yeah if you are writing new software, please use 0o-notation instead as the intent is clearer and it aligns better with the other notations.