C++ Logo

sg12

Advanced search

Re: [ub] Justification for < not being a total order on pointers?

From: Nevin Liber <nevin_at_[hidden]>
Date: Thu, 17 Oct 2013 09:42:21 -0500
On 17 October 2013 03:38, Peter Sommerlad <peter.sommerlad_at_[hidden]> wrote:

> Hi, just to throw in my 0.02 CHF:
> On 17.10.2013, at 07:27, Nevin Liber <nevin_at_[hidden]> wrote:
>
>
> Well, I dream the future with non-uniform memory architectures might make
> that argument wrong again. We might have "pointers" that differ
> substantially, depending if the memory address resides in RAM "directly"
> attached to a CPU or on a different CPU or on a GPU. And comparing such
> pointers wildly might not be the thing you should be allowed to do.
>
> Just remember, technology development often goes in circles, e.g., we get
> electric cars again after 100+ years, we are reinventing parallel
> programming (a lot of work from the 70s/80s gets rediscovered), etc.
>

I understand the fear argument, because (so far) that is the only argument
being made for not changing the standard to match existing practice.

But, even if segmented architectures, unlikely though it is, do come back,
the ordering problem still has to be addressed, as std::less<T*> is
required to totally order pointers. I just want operator< to be an
alternate spelling for that property.

Why should everyone else pretend to suffer (and I do mean pretend, because
outside of a small contingent of the committee, people already assume that
pointers are totally ordered with respect to operator<) to meet the
theoretical needs of some currently non-existent architecture?
-- 
 Nevin ":-)" Liber  <mailto:nevin_at_[hidden]>  (847) 691-1404

Received on 2013-10-17 16:43:05