From -6218099832497401603
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,9684813612e15361
X-Google-Attributes: gidf78e5,public
From: Scott Meyers <smeyers@aristeia.com>
Subject: Re: pointers: sizeof(pointer)
Date: 1998/06/27
Message-ID: <35942D10.24F0@aristeia.com>#1/1
X-Deja-AN: 366568729
Approved: Fergus Henderson <fjh@cs.mu.oz.au>
Content-Transfer-Encoding: 7bit
References: <slrn6oqcgp.lfi.sbnaran@bardeen.ceg.uiuc.edu> <6mkkaq$dgu@engnews1.Eng.Sun.COM> <3591A612.15DA@aristeia.com> <6mu1lq$fon@engnews1.Eng.Sun.COM> <35930246.1692@noSPAM.central.beasys.com>
X-Original-Date: Fri, 26 Jun 1998 23:22:36 GMT
Content-Type: text/plain; charset=us-ascii
Organization: -
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBFAgUANZTaheEDnX0m9pzZAQEeBgGAnFlbtSMOKqXq3X3czQZUwSKjt+ak/qdB hkfwBj7DxbYB1nmKkMgk6Fn9v3XFL2II =5vot
MIME-Version: 1.0
NNTP-Posting-Date: Fri, 26 Jun 1998 16:22:36 PDT
Newsgroups: comp.std.c++


David R Tribble wrote:
> Leave it to Microsoft to come up with a different, and inherently
> worse, solution.  I believe that they think of themselves as being

I like dumping on Microsoft (or IBM or Sun or HP...) as much as anybody,
because, well, because it's fun to pick on companies.  However, I got the
impression from Pietrek's article that Microsoft made its decision based on
the kinds of technical considerations Steve described for Sun and you
described for DEC.  From Matt's article:

  The second scenario for a 64-bit type model is ... leave the int as 32
  bits while using 64 bits for longs and pointers.  This is the model that
  64-bit Unix implementations use.  For Unix, [this] is a good choice from
  the portability perspective, since most Unix APIs use int parameters,
  rather than longs.

  Windows, on the other hand, uses lots of types that ultimately resolve
  down to a long, and hence would be 64 bits in this model.  For this
  reason, a [64-bit long] Windows implementation would have many of the
  same probams as the [64-bit int] model.  In addition, code that currently
  gets away with assuming that ints and longs are equivalent would break
  under [the 32-bit int, 64-bit long] model.

Of course, it's possible that this seemingly-technical justification is
a smokescreen crafted by Chris Carter and his X-File cronies to hide the
REAL reason for doing things this way, but then again, maybe not.

Scott

--
Scott Meyers, Ph.D.                  Voice: 503/638-6028
C++ Consulting and Training          Fax:   503/638-6614
Author of "Effective C++"            Email: smeyers@aristeia.com
  and "More Effective C++"           WWW:   http://www.aristeia.com/
---
[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://reality.sgi.com/austern_mti/std-c++/faq.html              ]



