lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] [lmi-commits] master bbcdaf5 1/2: Update commentary


From: Greg Chicares
Subject: Re: [lmi] [lmi-commits] master bbcdaf5 1/2: Update commentary
Date: Wed, 6 Jun 2018 14:16:11 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 2018-06-06 00:50, Vadim Zeitlin wrote:
[...]
> Practically speaking, I think "int" should be used everywhere and int64_t
> whenever a larger range is required. I don't really see any use for long
> nowadays

That's exactly the conclusion I've come to independently. In olden days,
'int' was the size of a CPU register, and that was commonly so small that
'long int' was needed (and then std::size_t when RAM grew too big for a
register to address all of it; and then 'long long int' because 'long int'
still wasn't big enough). If you didn't distinguish these types carefully,
porting to a different machine was a nightmare. Now, however, it's quite
safe to count on 'int' being at least 32 bits on any machine we'll ever
care about, and that's almost always big enough; when it isn't, we just
use std::int64t.

I've already removed 'long' from rate-table numbers, which didn't need to
be long int even in the 16-bit world. Soon I'll remove 'long' elsewhere.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]