Skip to content

How to style expos-only members [Was: Restyle expos-only member basic-formatting-string::str] #4702

Open
0 of 1 issue completed

Description

@tkoeppe

See #4680 (comment)

We should style the exposition-only member str of basic-formatting-string in regular upright font, as we typically do for expos-only members. We should also rename it to str_, as we do for private expos-only members.

Activity

  1. jensmaurer commented on Jun 17, 2021

    @jensmaurer
    Member

    The private ranges members are all styled \exposid.

    And, outside of ranges, we have a fair amount of member names not ending in _.

    Personally, I think all exposition-only member names should be italics, and we should find a better / more pronounceable way of creating a new namespace, other than appending _. (In ranges, we occasionally have "current" and "current_", and they mean different things.)

  2. added
    decision-requiredA decision of the editorial group (or the Project Editor) is required.
    on Jun 17, 2021
  3. tkoeppe commented on Jun 17, 2021

    @tkoeppe
    ContributorAuthor

    Do you have a sense of how many non-ranges private members there are?

  4. changed the title [-]Restyle expos-only member basic-formatting-string::str[/-] [+]How to style expos-only members [Was: Restyle expos-only member basic-formatting-string::str][/+] on Jun 17, 2021
  5. tkoeppe commented on Jun 17, 2021

    @tkoeppe
    ContributorAuthor

    Changing the issue to decide the general style first.

  6. jensmaurer commented on Jun 17, 2021

    @jensmaurer
    Member

    Do you have a sense of how many non-ranges private members there are?

    Rough estimate, counting the \expos markers (ignoring \exposid):

    $ grep -w expos *.tex | grep -v ranges.tex | wc -l
    275

    In other words, oodles of stuff.

  7. tkoeppe commented on Jun 17, 2021

    @tkoeppe
    ContributorAuthor

    OK, thanks. I feel like we're not going to resolve this for this mailing. Maybe for the next pre-meeting mailing!

  8. jensmaurer commented on Jun 18, 2021

    @jensmaurer
    Member

    Editorial meeting 2021-06-18: Consistent, global rule: All private data members have a _ suffix. All exposition-only names (including private data members) are styled with \exposid{...}.

    The presence of the _ suffix is saddening, but we don't have a better idea right now.

  9. removed
    decision-requiredA decision of the editorial group (or the Project Editor) is required.
    on Jun 18, 2021
  10. Dani-Hub commented on Jun 18, 2021

    @Dani-Hub
    Member

    Re @tkoeppe :

    Do you have a sense of how many non-ranges private members there are?

    In N4885 there are 51 occurrences within Clause [ranges], specifically the following ones:
    subrange: 2
    single_view: 1
    iota_view: 2
    iota_view<W, Bound>::iterator: 1
    iota_view<W, Bound>::sentinel: 1
    basic_istream_view: 2
    basic_istream_view<Val, CharT, Traits>::iterator: 1
    ref_view: 1
    filter_view: 2
    filter_view<V, Pred>::iterator: 2
    filter_view<V, Pred>::sentinel: 1
    transform_view: 2
    transform_view<V, F>::iterator: 2
    transform_view<V, F>::sentinel: 1
    take_view: 2
    take_view::sentinel: 1
    take_while_view: 2
    take_while_view<V, Pred>::sentinel: 2
    drop_view: 2
    drop_while_view: 2
    join_view: 2
    join_view::iterator: 3
    join_view::sentinel: 1
    split_view: 3
    split_view<V, Pattern>::outer-iterator: 2
    split_view<V, Pattern>::outer-iterator ::value_type: 1
    split_view<V, Pattern>::inner-iterator: 2
    common_view: 1
    reverse_view: 1
    elements_view: 1
    elements_view<V, N>::iterator: 1
    elements_view<V, N>::sentinel: 1

  11. tkoeppe commented on Jun 18, 2021

    @tkoeppe
    ContributorAuthor

    Thanks, Daniel! Unfortunately that seems to mean that we have a lot more "old" private members that we now need to update to the new style :-S

  12. JohelEGP commented on Aug 17, 2021

    @JohelEGP
    Contributor

    Editorial meeting 2021-06-18: Consistent, global rule: All private data members have a _ suffix. All exposition-only names (including private data members) are styled with \exposid{...}.

    The presence of the _ suffix is saddening, but we don't have a better idea right now.

    Non-static only?

    static constexpr bool @\exposidnc{ref-is-glvalue}@ = // \expos

  13. JohelEGP commented on Aug 17, 2021

    @JohelEGP
    Contributor

    The following Clauses are known to follow the rule (or not):

    • [ranges]
  14. W-E-Brown commented on Aug 17, 2021

    @W-E-Brown
    Contributor

    FWIW, I believe this is an incredibly silly de minimis issue to have spent any time on. However, since we have/are, ...

    I find that appending a useless trailing underscore to be an especially egregious waste of time. Moreover, such an emendation sends an entirely unintended message to readers, namely, that the Standard Library recommends the consistent use of trailing underscores for all such exposition-only member names. Since I can find no such policy or recommendation from WG21 (or even from LWG), I (1) object on the grounds that this is not a purely editorial change and (2) request reversion to status quo ante.

  15. jensmaurer commented on Aug 17, 2021

    @jensmaurer
    Member

    For [ranges], nothing was changed; the incoming papers generally had italics private data members with trailing underscores. Worse, sometimes we use current_ and current to mean different things (the latter is a meta-macro).

    The most important thing about private data members is that their names are not in any way reserved by the standard library and e.g. a user is allowed to #define a macro with that name. Styling them in an non-utterable way (e.g. italics) seems to help in conveying such a notation. See also our exposition-only concept names.

  16. added
    decision-requiredA decision of the editorial group (or the Project Editor) is required.
    on Aug 17, 2021
  17. removed
    decision-requiredA decision of the editorial group (or the Project Editor) is required.
    on Nov 19, 2021
  18. tkoeppe commented on Nov 19, 2021

    @tkoeppe
    ContributorAuthor

    @W-E-Brown: The status quo ante is not consistent across the standard, and something we want to improve. We will necessarily have to touch a fair number of places in the standard, no matter which way we go. Marking expos-only members up in the source seems helpful, regardless of how we style them, so that part of the work would need to get done no matter what.

    Have you got any concrete objections to any particular style? Otherwise, we seem to have a strong preference for italics and kebab-case (like all exposition-only names), and a mild preference for the trailing underscore based on partial existing practice.

    I'm inclined to use that throughout unless we have good reasons to prefer something else. But please do note that the ranges library would be ambiguous without the trailing underscore, so alternative proposals would have to provide an alternative disambiguation.

  19. tkoeppe commented on Nov 19, 2021

    @tkoeppe
    ContributorAuthor

    Editorial meeting: we would like to continue the direction we decided at the previous meeting, but would like to achieve consensus among the editors.

  20. W-E-Brown commented on Nov 20, 2021

    @W-E-Brown
    Contributor
  21. eisenwave commented on Nov 6, 2025

    @eisenwave
    Member

    Marking this P2 because there now is an objectively correct style for private/exposition-only members, and this issue relates to violations of that style.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2-BugPresentational errors and omissions

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions