Skip to content

Conversation

@kashish2710
Copy link
Contributor

This change corrects the language comparison by clarifying that increment chaining is possible in C++ only for pre-increment expressions. It avoids the incorrect implication that such chaining is generally supported in C, and improves the technical precision of the explanation around value vs reference evaluation.
Fixes #42600

@kashish2710 kashish2710 requested a review from a team as a code owner January 2, 2026 09:51
@kashish2710 kashish2710 requested review from Josh-Cena and removed request for a team January 2, 2026 09:51
@github-actions github-actions bot added Content:JS JavaScript docs size/xs [PR only] 0-5 LoC changed labels Jan 2, 2026
@github-actions
Copy link
Contributor

github-actions bot commented Jan 2, 2026

Preview URLs

(comment last updated: 2026-01-08 04:02:09)

Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Since this feature extremely limited in scope even in C++, I don't think we should draw analogies here.

@Josh-Cena Josh-Cena changed the title Clarify increment chaining behavior in C++ Remove incorrect C analogy Jan 8, 2026
@Josh-Cena Josh-Cena merged commit cf5a47b into mdn:main Jan 8, 2026
7 checks passed
@kashish2710
Copy link
Contributor Author

Thanks @Josh-Cena for the feedback! I agree — given how limited the behavior is even in C++, removing the analogy is the right call.
Appreciate the review and the learning opportunity.

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

Labels

Content:JS JavaScript docs size/xs [PR only] 0-5 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

C doesn't allow multiple increments chaining together

2 participants