Deutsch   English   Français   Italiano  
<v59bhe$ch8p$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!weretis.net!feeder8.news.weretis.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: James Kuyper <jameskuyper@alumni.caltech.edu>
Newsgroups: comp.lang.c
Subject: Re: Baby X is bor nagain
Date: Sun, 23 Jun 2024 10:30:06 -0400
Organization: A noiseless patient Spider
Lines: 52
Message-ID: <v59bhe$ch8p$1@dont-email.me>
References: <v494f9$von8$1@dont-email.me> <20240613174354.00005498@yahoo.com>
 <v4okn9$flpo$2@dont-email.me> <20240617002924.597@kylheku.com>
 <v4pddb$m5th$1@dont-email.me> <20240618115650.00006e3f@yahoo.com>
 <v4rv0o$1b7h1$1@dont-email.me> <20240618184026.000046e1@yahoo.com>
 <v4sd75$1ed31$1@dont-email.me> <877celzx14.fsf@nosuchdomain.example.com>
 <v4u85k$1t2pu$2@dont-email.me> <v4ucmn$1u14i$1@dont-email.me>
 <v4v2br$22c0m$1@dont-email.me> <v4v5nu$230rh$2@dont-email.me>
 <v4vfrn$24rv6$1@dont-email.me> <v50n9s$2fkko$1@dont-email.me>
 <v50poh$2g4ha$1@dont-email.me> <87iky3svqh.fsf@bsb.me.uk>
 <874j9nxsdy.fsf@nosuchdomain.example.com> <874j9ns382.fsf@bsb.me.uk>
 <86h6dlhb34.fsf@linuxsc.com> <8734p3rjno.fsf@bsb.me.uk>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Injection-Date: Sun, 23 Jun 2024 16:30:07 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="772cc68def027eeb07d5cdc31e761366";
	logging-data="410905"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+al9Ald75foZ/7Mls0GrW5TNv+nRCfJHQ="
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:/A9vyttZ76iwZ5WyRehUkXAjg78=
In-Reply-To: <8734p3rjno.fsf@bsb.me.uk>
Content-Language: en-US
Bytes: 4539

On 6/23/24 07:19, Ben Bacarisse wrote:
> Tim Rentsch <tr.17687@z991.linuxsc.com> writes:
> 
>> Ben Bacarisse <ben@bsb.me.uk> writes:
....
>>> I think it should be clearer.  What the "that is" phrase seems to
>>> clarify in no way implies a total order, merely that the repeated
>>> comparisons or the same elements are consistent with one another.  That
>>> the comparison function defines a total order on the elements is, to me,
>>> a major extra constraint that should not be written as an apparent
>>> clarification to something the does not imply it:  repeated calls should
>>> be consistent with one another and, in addition, a total order should be
>>> imposed on the elements present.
>>
>> I think you're misreading the first sentence.
> 
> Let's hope so.  That's why I said it should be clearer, not that it was
> wrong.
> 
>> Suppose we are in
>> court listening to an ongoing murder trial.  Witness one comes in
>> and testifies that Alice left the house before Bob.  Witness two
>> comes in (after witness one has gone) and testifies that Bob left
>> the house before Cathy.  Witness three comes in (after the first
>> two have gone) and testifies that Cathy left the house before
>> Alice.  None of the witnesses have contradicted either of the
>> other witnesses, but the testimonies of the three witnesses are
>> not consistent with one another.
> 
> My (apparently incorrect) reading of the first sentence is that the
> consistency is only required between the results of multiple calls
> between each pair.  In other words, if the witnesses are repeatedly
> asked, again and again, if Alice left before Bob and/or if Bob left
> before Alice the results would always be consistent (with, of course,
> the same required of repeatedly asking about the other pairs of people).

It says "When the same objects (consisting of size bytes, irrespective
of their current positions in the array) are passed more than once to
the comparison function, the results shall be consistent with one
another."
I can see you reading that as applying only when both arguments point to
the same pair of objects as another call to comparison function, but if
I do compar(&a,&b), compar(&b,&c), and compar(&c,&a), then each argument
of every call to compar() involves the same object as one of the
arguments of another call, and it seems to me that those same words
therefore require consistency of the results of those comparisons, too.
Interpreting those words that way might seem less obvious, but it has
the advantage of making the subsequent "That is, ..." correct, rather
than an error.
I certainly would favor improved wording that made this clearer. In
fact, simply explicitly mandating total ordering rather than making a
vague comment about consistency would probably be the best approach.