-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Pass interpolated string handlers by ref #57538
Comments
Tagging subscribers to this area: @dotnet/area-system-runtime Issue DetailsBackground and motivationOur default interpolated string handler, StringBuilder handler, and MemoryExtensions handler are all passed to their target methods by ref. But we neglected to do so for the Debug handlers; we should update those signatures as well. Benefits:
API ProposalSee the ref updates here: API UsageNo usage difference when using interpolated string syntax, which is how we expect these APIs to be used. RisksThis is a breaking change from .NET 6 Preview 7.
|
Looks good as proposed. Hopefully we'll be diligent in the future at always using pass-by-ref when the handler is a struct. |
Background and motivation
Our default interpolated string handler, StringBuilder handler, and MemoryExtensions handler are all passed to their target methods by ref. But we neglected to do so for the Debug handlers; we should update those signatures as well.
Benefits:
API Proposal
See the ref updates here:
https://github.com/dotnet/runtime/pull/57536/files#diff-cec8e6f471b4193246bdc0107b0dd7cbe131fb7fd189b288b37269c333d1171d
API Usage
No usage difference when using interpolated string syntax, which is how we expect these APIs to be used.
Risks
This is a breaking change from .NET 6 Preview 7.
The text was updated successfully, but these errors were encountered: