Re: Moving from C++ to VC++
- From: Victor Bazarov <v.Abazarov@xxxxxxxxxxxx>
- Date: Wed, 15 Jun 2005 14:55:55 -0400
William DePalo [MVP VC++] wrote:
"Victor Bazarov" <v.Abazarov@xxxxxxxxxxxx> wrote in message news:OUJQpDdcFHA.2736@xxxxxxxxxxxxxxxxxxxxxxx
What's wrong with assuming that "long has the length of the maximal integer for the hardware"?
Because it is an assumption that is not guaranteed to be true. A long doesn't have to be wider than an int - it just can't be narrower.
The statement about the assumption "not guaranteed to be true" and your explanation make an unnecessary assumption about the meaning of "maximal". I never asked for exclusivity. If there is more than one type that has the corresponding "maximally long hardware type", fine. What I don't understand here is the absence of a standard _arithmetic_ type when the hardware could provide it, and making excuses with some "backward compatibility" claim.
['int' times 'int'] may not fit in an 'int' but should probably fit in a 'long'.
Probably? What is "probable" has no bearing here.
Yes, it has. I am trying to show you what would make more sense for a programmer than "we'll just keep it the same as it was".
Now, how many lines of code were broken when Windows moved from 16-bit ints to 32-bit ints?
Lots.
What did people do about it?
They fixed them.
So, wouldn't it be logical to continue the same line of thought and guess that if (heaven forbid) we suddenly have 64-bit 'long' on the new 64-bit platform, those who will switch to that platform will fix breakage caused by the change? And, again, I am talking only about 'long' standard C++ type, not 'DWORD', which can happily stay 32 bits.
Was that perceived as unnecessary pain or was it just necessary to be able to use 32 bits from that point on?
It was perceived by most to be necessary because the 16 bit platform was in _reality_ as well as in perception inadequate for the tasks at hand.
So, at this point, is there perception that the 32-bit platform is inadequate for certain tasks? Is that perception what forces the progress to the 64-bit platform? Is the inadequateness generic (as you make it sound for the 16-bit case) or is it only limited to certain application areas? IOW, will the 32-bit platform still be adequate for some (if not most) of the stuff we do?
What if when moving to WinNT (in 1994?), MS decided to keep 'int' 16 bits along with UINT and WORD and WPARAM...
? Isn't that what we have happening now?
Nope. We have more capable hardware and precious few mass market applications that find the current hardware inadequate. We also have a real operating system. 16 bit Windows was remarkable only in its ability to do so much with so little in its quaint little way.
So, the conclusion here is... ??? If the breakage does occur (only on the 64-bit platform), couldn't it be dealt with giving thus more freedom to those who need a better standard C++ type layout instead of holding them back? You yourself seem to imply that there are not so many mass market applications that porting _them_ to Win64 with a 64-bit 'long' shouldn't really be a problem...
I can't imagine that after the Win64 is out everybody is going to get a copy immediately and if porting of all those applications that everybody uses on the daily basis is delayed because if 32->64 bit 'long' change, the World is going to end. No friggin' way.
V .
- Follow-Ups:
- Re: Moving from C++ to VC++
- From: Bo Persson
- Re: Moving from C++ to VC++
- From: William DePalo [MVP VC++]
- Re: Moving from C++ to VC++
- References:
- Moving from C++ to VC++
- From: NoName
- 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]
- Re: Moving from C++ to VC++
- From: Bo Persson
- 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: William DePalo [MVP VC++]
- Re: Moving from C++ to VC++
- From: Bo Persson
- Re: Moving from C++ to VC++
- From: William DePalo [MVP VC++]
- Re: Moving from C++ to VC++
- From: Bo Persson
- Re: Moving from C++ to VC++
- From: William DePalo [MVP VC++]
- Re: Moving from C++ to VC++
- From: Victor Bazarov
- Re: Moving from C++ to VC++
- From: William DePalo [MVP VC++]
- Re: Moving from C++ to VC++
- From: Victor Bazarov
- Re: Moving from C++ to VC++
- From: William DePalo [MVP VC++]
- Moving from C++ to VC++
- Prev by Date: Re: Total protection for your software against crack
- Next by Date: Re: Moving from C++ to VC++
- Previous by thread: Re: Moving from C++ to VC++
- Next by thread: Re: Moving from C++ to VC++
- Index(es):
Relevant Pages
|