Q: Have Span<T> and Memory<T> evolved? #28926
Labels
area-System.Memory
question
Answer questions and provide assistance, not an issue with source code or documentation.
Milestone
I ask this because I read Stephen Toub's article, 'All About Span: Exploring a New .NET Mainstay'. It says, "This article has been updated to reflect technical changes following its publication."
And yet, there may be two stories in circulation 'out there'. In Story dotnet/corefx#1, Span is only for items on the stack, and Memory may be used for items on the heap. That's the sense that I got from the Toub article.
Story dotnet/corefx#2 comes to me from Code Magazine; here's a link to an article by Ahson A. Khan:
https://www.codemag.com/article/1807051/Introducing-.NET-Core-2.1-Flagship-Types-Span-T-and-Memory-T
The first example in Khan's article speaks of "an array of bytes allocated somewhere on the heap", and it proceeds to use Span to access it.
These two stories cannot both be correct. Is Toub wrong? Is Khan wrong? Or, did Span evolve so that an older story went out of date? Which idea should be deprecated? TYVM.
The text was updated successfully, but these errors were encountered: