Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lib] Space between requires and its parameter list? #4720

Open
jensmaurer opened this issue Jun 25, 2021 · 3 comments
Open

[lib] Space between requires and its parameter list? #4720

jensmaurer opened this issue Jun 25, 2021 · 3 comments

Comments

@jensmaurer
Copy link
Member

jensmaurer commented Jun 25, 2021

Despite #4719, it is not at all clear whether there should be a space between "requires" and its parameter list.

Statistics: 74 places with space, 46 wihout.

fgrep "requires (" *.tex | wc -l

  • come up with a consistent rule
  • apply the rule everywhere
  • add a check
@jensmaurer jensmaurer added the decision-required A decision of the editorial group (or the Project Editor) is required. label Jun 25, 2021
@CaseyCarter
Copy link
Contributor

CaseyCarter commented Jun 25, 2021

In the library, we consistently use:

  • requires( (no space) to introduce a requires-expression with parameters,
  • requires { to introduce a requires-expression without parameters, and
  • requires (e) (space) to introduce a requires-clause whose first term e is not a primary-expression.

This makes it easy to determine at-a-glance when requires is introducing a requires-clause vs. a requires-expression.

There are, of course, counter-examples to this style in the Core portions of the Standard which is normal for all language features. The library picks one style to use consistently, and core shows a variety of possible styles.

@tkoeppe
Copy link
Contributor

tkoeppe commented Jun 25, 2021

This seems like a good rule. Perhaps we should add it to the wiki.

@jensmaurer jensmaurer changed the title [lib] space between requires and its parameter list? [lib] Space between requires and its parameter list? Jun 26, 2021
@tkoeppe
Copy link
Contributor

tkoeppe commented Sep 24, 2021

Editorial meeting decision: We like Casey's rule and will adopt it generally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants