Re: Moving from C++ to VC++
- From: "Bo Persson" <bop@xxxxxx>
- Date: Mon, 13 Jun 2005 19:24:17 +0200
"Doug Harrison [MVP]" <dsh@xxxxxxxx> skrev i meddelandet
news:1cpcoisgaqxnb.pzm9lwh4noqd.dlg@xxxxxxxxxxxxx
> On Mon, 13 Jun 2005 17:52:25 +0200, Bo Persson wrote:
>
>>>> Because now I have to use '__int64'?
>>>
>>> At least your code would then capture your requirement for the type.
>>
>> No it definitely does not!
>
> Let me see if I understand you. When one needs a 64 bit integer type,
> a 64
> bit integer type doesn't cut it. OK. Gotcha. No pleasing some people,
> I
> guess. :)
No, now you are making the assumptions. :-)
Using __int64 just means that int and long wasn't enough, because
someone decided to keep them 32 bit, even when the machine grew. So now
__int64 is a rather large integer, just like long once was. It doesn't
say that I wanted exactly 64 bits. It definitely doesn't say that 64
bits will still be okay when we get machines with 96 or 128 or whatever
bits. We just get yet another long type problem!
>
>> It only documents that we need a rather long integer.
>
> Actually, it states that in reality, you're using a 64 bit integer.
> When
> you use long, all you can say is that it's at least 32 bits and at
> least as
> large as int.
But some of had expected the type long to be, like a kind of long type.
Something to use when int just isn't enough. Something the implementor
would make big enough when the system changed.
>
>> What happens when
>> we move on to the next generation?
>
> For one thing, for the purposes of this thread, all the code that
> wrongly
> assumed long was 64 bits has to be modified.
>
>> Right, *some* of these will have to be changed into __int128. Which
>> ones? Nobody knows!
>
> That doesn't necessarily follow.
So you expect __int64 to grow when we need an even larger index type?
:-)
Bo Persson
.
- Follow-Ups:
- Re: Moving from C++ to VC++
- From: Doug Harrison [MVP]
- Re: Moving from C++ to VC++
- From: Carl Daniel [VC++ MVP]
- 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
- Re: Moving from C++ to VC++
- From: Carl Daniel [VC++ MVP]
- Re: Moving from C++ to VC++
- From: Hendrik Schober
- Re: Moving from C++ to VC++
- From: Doug Harrison [MVP]
- Re: Moving from C++ to VC++
- From: Hendrik Schober
- Re: Moving from C++ to VC++
- From: Doug Harrison [MVP]
- Re: Moving from C++ to VC++
- From: Hendrik Schober
- Re: Moving from C++ to VC++
- From: Doug Harrison [MVP]
- Re: Moving from C++ to VC++
- From: Bo Persson
- Re: Moving from C++ to VC++
- From: Doug Harrison [MVP]
- Moving from C++ to VC++
- Prev by Date: Re: how to great app without console
- Next by Date: Re: Is it valid to use "delete this" to implement IUnknown::Release()?
- Previous by thread: Re: Moving from C++ to VC++
- Next by thread: Re: Moving from C++ to VC++
- Index(es):
Relevant Pages
|