Skip to content

clarify the *return-by-ref* expression evaluation #805

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

Closed
BillWagner opened this issue Jun 5, 2023 · 1 comment · Fixed by #1006
Closed

clarify the *return-by-ref* expression evaluation #805

BillWagner opened this issue Jun 5, 2023 · 1 comment · Fixed by #1006
Assignees
Labels
type: clarity While not technically incorrect, the Standard is potentially confusing
Milestone

Comments

@BillWagner
Copy link
Member

BillWagner commented Jun 5, 2023

See https://github.com/dotnet/csharpstandard/pull/795/files#r1217459209

The language for return-by-ref implies a different evaluation. Could use some wordsmithing.


Associated WorkItem - 178988

@jskeet
Copy link
Contributor

jskeet commented Jun 6, 2023

(We think this can wait until after C# 7.)

@jskeet jskeet added the type: clarity While not technically incorrect, the Standard is potentially confusing label Jul 11, 2023
@jskeet jskeet added this to the Pre-C# 8.0 milestone Sep 21, 2023
@BillWagner BillWagner self-assigned this Oct 23, 2023
@BillWagner BillWagner moved this from 🔖 Ready to 🏗 In progress in dotnet/docs November 2023 sprint Nov 22, 2023
BillWagner added a commit to BillWagner/csharpstandard that referenced this issue Nov 22, 2023
Fixes dotnet#805

Clarify that return-by-ref expressions are evaluated the same as return-by-value expressions. The distinction is that for return-by-ref, the result must be a variable reference.
@BillWagner BillWagner moved this from 🏗 In progress to 👀 In review in dotnet/docs November 2023 sprint Nov 22, 2023
BillWagner added a commit that referenced this issue Nov 29, 2023
* wordsmiting on return-by-ref

Fixes #805

Clarify that return-by-ref expressions are evaluated the same as return-by-value expressions. The distinction is that for return-by-ref, the result must be a variable reference.

* bonus typo fix

* Update standard/statements.md

Co-authored-by: Jon Skeet <[email protected]>

---------

Co-authored-by: Jon Skeet <[email protected]>
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in dotnet/docs November 2023 sprint Nov 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: clarity While not technically incorrect, the Standard is potentially confusing
Projects
No open projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants