Allow Memory<T> to be target of collection expressions #9495
Unanswered
petrroll
asked this question in
Language Ideas
Replies: 1 comment
-
According to dotnet/runtime#111715 (comment), it will be unblocked by #9009. Tbh, I think |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
While Span is very much a first class citizen and participates in new C# features (collection expressions, utf8 string literals #9493) Memory seems to be missing. And while Span is usually enough for consuming data, it is frequently impossible to use for producing them (async network servers).
As such it is unfortunate that:
And similarly on callsites, etc. It's most annoying when trying to pass an empty "memory", where instead of [] one has to use older/more verbose static empty things that can be converted to readonlymemory and/or
default
which is less readable.Beta Was this translation helpful? Give feedback.
All reactions