On 03/25/2010 05:12 PM, Walter Bright wrote:
bearophile wrote:
Regarding octals (and multi-precision integer literals, and unit system
suffixes), it seems C++0x has user-defined literals :-)
http://en.wikipedia.org/wiki/C++0x#User-defined_literals (I am not
asking to
solve the D octal problem with them.)
The C++0x syntax for them to me appears to be a workaround for the bug
that C++ templates cannot accept string literal arguments. As Andrei
mentioned, the D version:
Suffix!"string"
more than adequately replaces it, and has the advantage of not requiring
the user to learn a new syntax.
Even better, D's user defined literals can be executed and resolved at
compile time, while C++0x's are runtime only creations.
Then you'll be happy to start using octal as soon as I commit it.
Andrei