Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

11
  • 19
    Option A: Blame yourself. Option B: Blame the world. Option C: chuckle as you have learned something. Commented Aug 4, 2011 at 18:50
  • 13
    @Petrozza - IMO the C-style use of a leading zero to indicate octal was never a good choice, but it's history - probably a bit of C heritage, though it may be even older. I think Ada has one of the better conventions - an octal number would be written 8#1234567#, a hex number 16#abcdef#, etc and leading zeros are just leading zeros - any base from 2 to 16 (at least) is valid, and all are visually obvious and easy to understand. Commented Aug 4, 2011 at 22:16
  • 2
    @Petruza Your question in its original form was not constructive for this site, and it was improved by the community so that it could remain open: please see the FAQ for more information about why people do this and why we encourage it. If you have any additional questions or concerns, please raise them on our meta-discussion site, not in your question. Commented Aug 6, 2011 at 7:50
  • 11
    Option D: "blame PHP" is always the right choice, regardless of the problem Commented Jan 19, 2014 at 7:49
  • 2
    @Steve314 I totally agree. Another noteworthy example is Python where they have the 0o prefix (which is consistent with 0x and 0b but perhaps a little hard to distinguish from 00). And since Python 3, extra leading zeros a re a syntax error to prevent this kind of bugs. Commented Sep 15, 2015 at 4:34