Number literals (Was: Re: Case Range Statement ..)
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Tue Jul 7 18:23:44 PDT 2009
bearophile wrote:
> Andrei Alexandrescu:
>> No, it's exactly the opposite - putting on the table a rotten fish.<
>
> If it's so smelly all people will avoid it quickly, so no harm done :-)
>
>
>> Big integer literals can be accommodated as compile-time strings.
>
> Do you mean like this?
> BigInt a = "12_345_678_900_345_678_900_000";
>
> If that's what you say, then it's OK. There are more important things to think about.
Needs to be something like:
BigInt a = bigIntLiteral!"12_345_678_900_345_678_900_000";
Anyway, I think this feature is thoroughly useless. An adage says that
the only numeric literals in a program should be 0, 1, and -1. How many
big integer literals can you think of right now?
Andrei
More information about the Digitalmars-d
mailing list