Re: Moving from C++ to VC++
- From: "Carl Daniel [VC++ MVP]" <cpdaniel_remove_this_and_nospam@xxxxxxxxxxxxxxx>
- Date: Wed, 8 Jun 2005 10:20:53 -0700
Hendrik Schober wrote:
> Carl Daniel [VC++ MVP]
> <cpdaniel_remove_this_and_nospam@xxxxxxxxxxxxxxx> wrote:
>> Victor Bazarov wrote:
>> [...]
>>> 'long' is 32 bits on a 64-bit platform? Wow... No, really? I am
>>> blown away, honestly.
>>
>> On 64 bit Windows, yes. Many 64-bit *nix's chose to make long be 64
>> bits.
>>
>> This decision was based on a survey of several million lines of code
>> that revealed that a great deal more code would be broken by
>> chanigng long to 64 bits than would benefit from the change.
>
> Good approach, really. Everybody played it
> stupid, so we just adapt to stupidity.
> Honestly, what will do we do when 128bit
> processors come? Keep 'long' at 32bit, just
> because it's been this way for decades???
>
> (Can you tell that this attitude to value
> the past over the future is really getting
> on my nerves?)
The fact is, very few applications will ever need to use a 64-bit integer
type, even fewer will need a 128-bit integer. Breaking compatibility with
untold scores of current programs to favor those very few future programs
that need the larger type just doesn't make sense. Those few programs that
do need that large integer size can simply use __int64 (or int_t<64>, or
whatever other new integer types we may see in C++ in the future).
The legitimate, common uses I can see for a 64 bit integer type involve
representation of values of or differences between 64 bit pointers, and we
have size_t and prtdiff_t for that (and yes, they're both 64 bits on 64 bit
Windows).
-cd
.
- Follow-Ups:
- Re: Moving from C++ to VC++
- From: Hendrik Schober
- Re: Moving from C++ to VC++
- References:
- Moving from C++ to VC++
- From: NoName
- Re: Moving from C++ to VC++
- From: Severian [MVP]
- Re: Moving from C++ to VC++
- From: Victor Bazarov
- Re: Moving from C++ to VC++
- From: Carl Daniel [VC++ MVP]
- Re: Moving from C++ to VC++
- From: Hendrik Schober
- Moving from C++ to VC++
- Prev by Date: Re: Moving from C++ to VC++
- Next by Date: Text file output
- Previous by thread: Re: Moving from C++ to VC++
- Next by thread: Re: Moving from C++ to VC++
- Index(es):
Relevant Pages
|