DMD 1.013 release
renoX
renosky at free.fr
Fri Apr 20 10:14:18 PDT 2007
Roberto Mariottini a écrit :
> Walter Bright wrote:
>> Bug fixes, some of them rather nasty.
>>
>> http://www.digitalmars.com/d/changelog.html
>
> > Issue #1147: Typo in phobos/std/file.d: 4069 should be 4096
> >
> > phobos/std/file.d line 1422:
> > size_t BUFSIZ = 4069 * 16;
>
>
> What about having some predefined suffix to represent common two's powers?
>
> int x = 4_k; // == 4 * 1024 == 4_096
> int y = 8_M; // == 8 * 1024_k == 8_388_608
> int z = 2_G; // == 2 * 1024_M == 2_147_483_648
Why would 'k' be 1024 instead of the normal 1000?
As an aside, I like the syntax <number>_<type> as a syntax sugar for
<type>(<number>), this allow easy to read computation with units:
nb_apple = 10_apple + 20_apple;
regards,
renoX
>
> and obviously:
>
> size_t BUFSIZ = 16 * 4_k;
>
> This could prevent many typos.
>
> Ciao
More information about the Digitalmars-d-announce
mailing list