Number literals (Was: Re: Case Range Statement ..)
Jarrett Billingsley
jarrett.billingsley at gmail.com
Tue Jul 7 20:40:02 PDT 2009
On Tue, Jul 7, 2009 at 11:20 PM, Walter
Bright<newshound1 at digitalmars.com> wrote:
> Jarrett Billingsley wrote:
>>
>> Totally agree. They're cruft that just complicate lexical analysis.
>
> Not a significant issue, as the code to lex it is done, works, and is
> readily available.
I'm not going to argue this anymore.
>> Or just drop octal altogether. Outside of chmod, when is there any
>> legitimate need for it these days?
>
> Translating C code to D.
I don't see this as a reasonable justification. Octal isn't used that
much in C either, and D is already so far from C that you need an
automated tool to do it, so you might as well just have the tool
translate them. The compiler could even disallow leading zeroes,
giving you an error on any integer literals that weren't automatically
translated.
More information about the Digitalmars-d
mailing list