🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #1253

Re: Zero-length structures and pointer comparisons

#1253
From: Johan Bengtsson
Date: Tue, 15 Dec 1992 18:59
26 lines
1795 bytes
Jim Adcock (jimad@microsoft.com) wrote:
: In article <1992Dec12.154918.2220@ucc.su.OZ.AU> maxtal@extro.ucc.su.OZ.AU (John MAX Skaller) writes:
: |which cannot break existing implementations but provides a  total
: |order by way of a library function? If so, can we put this to
: |the library WG?

: In any case, "ptrcmp" would be a misnomer, because what is being compared
: is *not* pointers, but rather the underlying *assumed* implementation of 
: pointers using machine addresses.  The correct name might be something like 
: "addrcmp" then, so as to not further confuse programmers on the difference
: between language and implementation.

No, this is not right.  You can require that a total ordering of all
pointers exist, without assuming anything about their representation.

The abstract ordering property will probably be implemented using
machine addresses if pointers are implemented that way, but it is not
a given that total pointer ordering needs machine addresses.

Therefore, "ptrcmp" is a much better name than "addrcmp".

-- 
--------------------------------------------------------------------------
| Johan Bengtsson, Telia Research AB, Aurorum 6, S-951 75 Lulea, Sweden  |
| Johan.Bengtsson@lulea.trab.se; Voice:(+46)92075471; Fax:(+46)92075490  |
--------------------------------------------------------------------------
Technical Details
Message-ID: <5384@holden.lulea.trab.se>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!hagbard!loglule!jbn
References: <1992Dec14.225659.24225@microsoft.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sunic!hagbard!loglule!jbn
From: jbn@lulea.trab.se (Johan Bengtsson)
Newsgroups: comp.std.c++
Subject: Re: Zero-length structures and pointer comparisons
Message-ID: <5384@holden.lulea.trab.se>
Date: 15 Dec 92 18:59:55 GMT
References: <1992Dec14.225659.24225@microsoft.com>
Organization: Telia Research AB, Aurorum 6, 951 75 Lulea, Sweden
Lines: 26
X-Newsreader: TIN [version 1.1 + PL8]