-
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
Standard FixedArray types in BCL? #102462
Comments
Tagging subscribers to this area: @dotnet/area-system-runtime |
This sounds like the perfect scenario for const generics #89730 |
As you mentioned, const generics are probably coming in .NET 9. Why would your proposed |
Oh, where was this announced? I didn't say that they are coming but was actually assuming not anytime soon. It's tagged as milestone on the other issue that I missed, but not sure there is someone taking the lead to challenge it. If that is really coming, yes, that issue can be closed |
There are no plans for them in any version so far, but, perhaps, issues like this will help to move the needle eventually |
Well, #89730 is tagged with the .NET 9 milestone. |
When an issue is tagged for a milestone, it just means that it might be evaluated for this milestone, not that it is going to be done. From Egor's comment that is working closely with folks in the .NET teams, it doesn't look like it's coming. |
Hey,☺️
I have been using InlineArray quite extensively in the past months and I love it! Though, one point of difficulty is the fact that it forces to create custom types for a specific kind of array (e.g array of
int[4]
) which limits the interoperability between libraries.For example, recently I had to roll out my own set of
FixedArray#<T>
to be able to use the same type across the different C/C++ interop libraries developed in this project.A broader related issue is:
But this goes into more difficult territories to get it right language and runtime wise...
So, I'm wondering if having such a type (
FixedArray#<T>
) builtin in the BCL would be easier to bring (up to e.g 1024 elements, that's the point that is problematic without const literal generic) down into a namespace or a static type (System.FixedArrays
) that would not pollute too much the existing namespaces?Thoughts?
The text was updated successfully, but these errors were encountered: