Summary: Safer number literals
--- 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
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):
Optionally D can also turn FP literals like the following into syntax errors:
To require something like:
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: -------