http://d.puremagic.com/issues/show_bug.cgi?id=2656

           Summary: Require 0o format for octal literals
           Product: D
           Version: unspecified
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: DMD
        AssignedTo: bugzi...@digitalmars.com
        ReportedBy: clugd...@yahoo.com.au


D should follow Python's lead in removing the archaic, subtle, and unintuitive
format for octal literals. The obvious choices are of the form 0c45 and 0o45.
The key argument used for the "0o" format is here:

http://mail.python.org/pipermail/python-dev/2006-February/060351.html

and basically argues that since in printf(), "%o" is used for octal, whereas
"c" is used for char, "o" is the natural choice.

Buggy code like

  a = 045;

is a very rare bug, but horribly difficult to identify.
Not a high priority, but it's the kind of C baggage which D has always aimed to
jettison.


-- 

Reply via email to