Octal literals: who uses this?
Sean Kelly
sean at invisibleduck.org
Sat Mar 14 07:44:10 PDT 2009
Christopher Wright wrote:
> I've been looking at dil and lexing D. Lexing character literals and
> string literals is not quite so easy as I thought it would be, but
> overall not difficult either.
>
> One thing I'm curious about:
> There are three forms of hex literals:
> \x: 2 digits
> \u: 4 digits
> \U: 8 digits
>
> There is one form of octal literal:
> \: 1 to 3 digits
>
> Why? With hex literals, each option is a fixed width. That is sensible.
>
> Octal literals aren't necessary with hex literals, but they might be
> convenient. However, making them variable width seems like it opens up
> the possibility for obscure bugs. I would not recommend that anyone use
> octal literals, and I don't think they're an advantage to the language.
> Even if they were, their current representation is not.
>
> Can we just remove this?
All the escaped literals are going away, I believe.
More information about the Digitalmars-d
mailing list