Add documentation links for ByRef fields and byref-like generics#123626
Add documentation links for ByRef fields and byref-like generics#123626
Conversation
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
|
The link should also be added in "ByRefLike types in generics" (section after "Ref Fields"). |
|
@copilot Please change mention of |
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Done in commit 11fd35d. Updated the text to clarify these are "potential future additions" and added a link to the C# language specification section explaining why these constructs were not enabled. |
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
@copilot Address this feedback |
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
Co-authored-by: jkotas <6668460+jkotas@users.noreply.github.com>
|
@GeeLaw @huoyaoyuan Does this look good? |
There was a problem hiding this comment.
Pull request overview
This PR enhances documentation for ByRef fields and byref-like generics by adding reference links to C# language proposals and related issues, along with concrete examples of implemented features.
Changes:
- Added documentation links connecting runtime specifications to C# language proposals for ref fields and byref-like generics
- Clarified which features are currently implemented versus potential future additions
- Added concrete motivating examples showing real-world usage of byref-like types in generic parameters
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| docs/design/specs/Ecma-335-Augments.md | Added links to C# language proposals for ref fields and byref-like generics, and split the ref fields section into two paragraphs for better clarity |
| docs/design/features/byreflike-generics.md | Added concrete examples of implemented features (Action/Func with Span, string.Create) and clarified that Span and Span<Span> are potential future additions |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
It looks a bit clear now. |
|
Under "ByRefLike types in generics", it's not pointed out that the runtime currently doesn't support substituting
Given the status of |
It is unfinished feature. I would not recommend depending on it. |
|
In general, |
|
/ba-g markdown change only |
Description
Adds reference links to improve documentation clarity for ByRef fields and byref-like generics features.
The changes document the C# language support requirements, add concrete motivating examples of implemented features, and clarify the current state of certain constructs.
Changes
docs/design/specs/Ecma-335-Augments.md:
docs/design/features/byreflike-generics.md:
Action<Span<char>>andFunc<int, Span<byte>>into a single bullet demonstrating delegate-based APIs withSpan<T>parameters and return types.string.Create<TState>(int length, TState state, SpanAction<char, TState> action)example showing efficient string creation using stack-allocated buffers with ByRefLike types in generic parameters.Span<TypedReference>andSpan<Span<char>>are potential future additions rather than currently enabled features.Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.