Skip to content

[exec.run.loop] Remove code font formatting for count and state#8307

Merged
tkoeppe merged 1 commit into
mainfrom
cd26-361
Nov 6, 2025
Merged

[exec.run.loop] Remove code font formatting for count and state#8307
tkoeppe merged 1 commit into
mainfrom
cd26-361

Conversation

@jensmaurer

Copy link
Copy Markdown
Member

Fixes NB US 231-361 (C++26 CD).

Fixes cplusplus/nbballot#936

@jensmaurer jensmaurer added the ballot-comment Response to an NB or ISO comment on a ballot label Oct 5, 2025
@jensmaurer

Copy link
Copy Markdown
Member Author

@jwakely , having exposition-only data members and an exposition-only enumeration might be the better outcome here, but that leaves the atomic nature of count and state a bit out in the rain.

@jwakely

jwakely commented Oct 5, 2025

Copy link
Copy Markdown
Member

It seems a little unnatural to refer to "count" and "state" this way, when they aren't actual variables. We could rephrase p2 in terms of having a counter, and then refer to "the counter" and "the associated state" rather than just "count" and "state". And maybe capitalise the state names, Starting etc.

But I don't feel strongly about that suggestion.

@jensmaurer jensmaurer added this to the C++26 milestone Oct 6, 2025
@tkoeppe

tkoeppe commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

I fully agree that this is now somewhat unnatural. I appreciate that we don't have actual expos-only variables and that the current state is broken in that regard, but the phrasing we use only really works when talking about variables. If we're instead talking about some general concept that was introduced locally, I think the phrasing needs to be adapted.

The terms are introduced in https://eel.is/c++draft/exec.run.loop.general#2: "A run_loop instance has an associated count that [...]". We could refer to this "the instance's count" and "the instance's state", say, or "the {count,state} of the run_loop [object]", or in a crunch even "the {count,state} of *this".

I think I mildly prefer the first version, but I'd like to hear other opinions. With the first version I'd also be happy to say "the instance" only once, so e.g. "The instance's count is 0 and state is starting."

Thoughts?

@jwakely

jwakely commented Oct 31, 2025

Copy link
Copy Markdown
Member

I don't love the word "instance, rather than say "the object" or "The run_loop" but "instance" is the word used there in the introductory prose, so it would be consistent.

I like "The instance's count" a lot more than just "Count".

@tkoeppe

tkoeppe commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

Just "the run_loop" would be nice, but pedants might complain that that's a class and not an object. I'd be happy with "the object", too. But can we try it out in context? "The count of the object is 0 and the state is starting."? "The object's count is 0 and its state is starting."?

@jwakely

jwakely commented Oct 31, 2025

Copy link
Copy Markdown
Member

"The object's count is 0 and its state is starting."?

I don't hate it, but I don't love it either.

Another option would be "The run_loop instance's count is 0 and its state is starting" which is verbose but matches the intro wording and should be pedant-proof?

There may be no perfect answer here, we can just pick on that's better than the status quo.

@tkoeppe

tkoeppe commented Oct 31, 2025

Copy link
Copy Markdown
Contributor

Another option would be "The run_loop instance's count is 0 and its state is starting" which is verbose but matches the intro wording and should be pedant-proof?

Yes, I'd be fine with that, and also don't hate it. But does it scale? Will we say that same thing for every itemdescr?

@tkoeppe

tkoeppe commented Nov 1, 2025

Copy link
Copy Markdown
Contributor

@jensmaurer Could you perhaps update the PR to use that wording Jon suggested?

@jensmaurer

Copy link
Copy Markdown
Member Author

@tkoeppe , I've done that.

@tkoeppe

tkoeppe commented Nov 2, 2025

Copy link
Copy Markdown
Contributor

I think that looks very nice, thank you! @jwakely, what do you think?

@tkoeppe tkoeppe requested a review from jwakely November 4, 2025 20:12
Comment thread source/exec.tex Outdated
@tkoeppe tkoeppe requested a review from jwakely November 6, 2025 16:37
@tkoeppe tkoeppe merged commit 50ded69 into main Nov 6, 2025
4 checks passed
@jensmaurer jensmaurer deleted the cd26-361 branch November 7, 2025 07:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ballot-comment Response to an NB or ISO comment on a ballot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants