Integral literals with Exp?

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Mon Sep 15 02:13:25 PDT 2014


On 9/15/2014 1:54 AM, John Colvin wrote:
> On Monday, 15 September 2014 at 00:54:40 UTC, Walter Bright wrote:
>> On 9/13/2014 12:23 AM, bearophile wrote:
>>> Is it a good idea to accept code like this, to shorten some constants?
>>>
>>> void main() {
>>>     int x = 1e6;
>>> }
>>
>> 1_000_000 solves  that problem.
>
> How does adding extra _s help with shortening constants?

Readability is the goal, not minimizing the number of characters.


More information about the Digitalmars-d mailing list