-
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
Bring back TypedReference #19507
Comments
@weshaggard @danmosemsft any thoughts? |
I have no objection (I imagine the cost of (2) and (3) is the main consideration) I'm not sure why we'd put it in Standard -- it may be present in other platforms, but it's used for (1) __arglist that is not necessarily present (dotnet/standard@6e3ad1) and (2) these new functions which won't be present. |
I also don't have any concerns as it is primarily a runtime/codegen/language feature then it is a library feature. If we did add it to .NET Standard 2.0 as @danmosemsft points out it can only contain the APIs that already exist in the full .NET framework. |
Could we also consider |
@Thaina I am not sure what you mean. ref returns are part of C# 7. dotnet/roslyn#118. Check the readme in Roslyn on how to get latest builds of C# 7 to give it a try. Also, any questions about this feature would be best asked in the Roslyn repo. |
@jkotas I thought you was mention this thread to me at dotnet/coreclr#8877 What I mean is reflection edit: well, not directly this thread. I just track this from #19484. But still the same. |
We can certainly expose The .NET Standard work is discussed in dotnet/standard#20. |
I do not think we need to rush it to .NET Standard 2.0. It is good enough if we add it to netcoreapp first - together with the other APIs that will make it actually useful. |
The API was already approved and it's already added to .NET Standard and .NET Core. |
TypedReference has not been very useful type so far, with non-trivial implementation cost, and that is why we have decided to not include it in .NET Standard.
However, the recent discussion #19484 revealed that it is a good building block for new high-performance reflection APIs that avoid boxing and address other reflection limitations. We should consider bringing it back.
The steps are:
__refvalue
and similar keywords)This issue is tracking the first step.
The text was updated successfully, but these errors were encountered: