http://d.puremagic.com/issues/show_bug.cgi?id=3837
Summary: Safer number literals Product: D Version: 2.040 Platform: Other OS/Version: Windows Status: NEW Severity: enhancement Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: bearophile_h...@eml.cc --- Comment #0 from bearophile_h...@eml.cc 2010-02-18 13:25:35 PST --- Octal numbers are not common, but sometimes less experienced programmers can add leading zeros to align numbers or for other purposes, and this can cause bugs: int x = 010; This assigns x to value 8. To avoid that bug D can turn leading zeros in syntax errors (for safety with code ported from C to D), and a safer syntax can be introduced for octal literals, for example like in Python3 (or some other syntax can be invented): 0o10 0O10 Optionally D can also turn FP literals like the following into syntax errors: .5 3. To require something like: 0.5 3.0 But this is less important than the octal syntax. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------