Skip to content

"Syntactic" circularity between [expr.add]/4 and [expr.sub]/1? #2670

Closed
@languagelawyer

Description

@languagelawyer
Contributor

[expr.sub]/1 defines subscripting through pointer arithmetic

The expression E1[E2] is identical (by definition) to *((E1)+(E2))

[expr.add]/4, defining pointer arithmetic, uses syntax looking like subscripting

… if P points to element x[i] of an array object x with n elements,81 the expressions P + J and J + P (where J has the value j) point to the (possibly-hypothetical) element x[i+j]…

Not that x[i] necessarily means subscripting expression, but I think it is still better to replace such constructs with plain English wording like

i-th element of an array object x

instead of

element x[i] of an array object x

Activity

jensmaurer

jensmaurer commented on Mar 10, 2019

@jensmaurer
Member

Except that we index arrays zero-based, but English does not allow us to talk about the 0-th element. We could say x i , though.

added
decision-requiredA decision of the editorial group (or the Project Editor) is required.
on Mar 10, 2019
W-E-Brown

W-E-Brown commented on Mar 10, 2019

@W-E-Brown
Contributor
removed
decision-requiredA decision of the editorial group (or the Project Editor) is required.
on Jun 5, 2019
jensmaurer

jensmaurer commented on Jun 5, 2019

@jensmaurer
Member

Editorial meeting: We're still unhappy with "i-th", at least without further context. Say "array element i of array object x" instead, taking "array element" as a term of art.

self-assigned this
on Jun 6, 2019
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

    Participants

    @W-E-Brown@jensmaurer@languagelawyer

    Issue actions

      "Syntactic" circularity between [expr.add]/4 and [expr.sub]/1? · Issue #2670 · cplusplus/draft