logoalt Hacker News

CodesInChaosyesterday at 2:58 PM1 replyview on HN

Another case many integer parsing functions get wrong is that they interpret a leading 0 as an octal indicator.

That should be opt-in via a flag, if it needs to be supported at all. Unix file permissions are the only deliberate use of octal I've ever seen.


Replies

kevin_thibedeauyesterday at 3:09 PM

It used to be much more common. In the 70s there was a lot of collective hesitance to use hex with its strange letter digits. Octal was the compact representation of choice.