Skip to content

[expr.rel] "compares greater" term is needlessly confusing #1938

Closed
@zygoloid

Description

@zygoloid
Member

In [expr.rell]p3, we implicitly introduce a relation called "compares greater". However, it's confusing to use this term, since there are other cases that might /also/ compare greater in the colloquial sense, if they fall into the ~(p compares greater than q) /\ ~(p compares greater than p) case. It's also easy to misread p3 as actually specifying the result of the comparison operators rather than just defining an intermediate term.

How about:

  1. Changing the introductory sentence to "The result of comparing unequal pointers to elements is specified in terms of a "definitely compares greater" relation, defined as follows:"
  2. Replace "compares greater" with "definitely compares greater" throughout.

Likewise in [expr.eq]p2 and p3 we should make it clear that we're just defining a "compares equal" relation, not actually defining the result of the operators. This is confounded by p3.3 and p3.4 actually trying to define the result of the the operators ("the result is unspecified"). As per the [expr.rel] changes, we should change the introductory sentence to clarify this, rename the relations to "definitely compare equal" and "definitely compare unequal", and change the "the result is unspecified" to "neither definitely compare equal nor definitely compare unequal".

Activity

jensmaurer

jensmaurer commented on Feb 24, 2018

@jensmaurer
Member

I like changing the introductory sentence, actually introducing the term we define here. (Is this local enough that it shouldn't be an italicized term? On the other hand, putting it into the index might be useful in this case.) I also like avoiding "unspecified" in [expr.eq] p3.3 and p3.4.

I'm less enthused about the "definitely" prefix. Maybe change the intro sentence to use "an auxiliary relation ... defined as follows"? After all, what we want is point people to the fact that this relation is not directly giving the result of the operators. I feel "definitely" doesn't go far enough in that direction.

added
decision-requiredA decision of the editorial group (or the Project Editor) is required.
on Feb 24, 2018
jensmaurer

jensmaurer commented on Mar 16, 2018

@jensmaurer
Member

Editorial meeting consensus:
"is defined in terms of a partial order consistent with the following rules:" and use "is required to compare greater" in the definition.

removed
decision-requiredA decision of the editorial group (or the Project Editor) is required.
on Mar 16, 2018
changed the title [-]"compares greater" term is needlessly confusing[/-] [+][expr.rel] "compares greater" term is needlessly confusing[/+] on Mar 17, 2018
self-assigned this
on Mar 23, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    No branches or pull requests

      Participants

      @zygoloid@jensmaurer

      Issue actions

        [expr.rel] "compares greater" term is needlessly confusing · Issue #1938 · cplusplus/draft