Skip to content
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

Should we rename Span<T> to Memory<T> and Memory<T> to something else? #20574

Closed
ahsonkhan opened this issue Mar 11, 2017 · 6 comments
Closed
Labels
api-needs-work API needs work before it is approved, it is NOT ready for implementation area-System.Memory design-discussion Ongoing discussion about design without consensus
Milestone

Comments

@ahsonkhan
Copy link
Contributor

@terrajobst @KrzysztofCwalina

@jkotas
Copy link
Member

jkotas commented Mar 11, 2017

Check the discussion in the linked CoreCLR issue.

@ahsonkhan ahsonkhan changed the title Should we rename Span to Memory and Memory to something else? Should we rename Span<T> to Memory<T> and Memory<T> to something else? Mar 11, 2017
@jkotas
Copy link
Member

jkotas commented Mar 13, 2017

This needs to finalized for 2.0. I do not think we will be able to rename it after it.

@AlgorithmsAreCool
Copy link
Contributor

Perhaps:
Span<T> -> Memory<T>
Memory<T> -> MemoryRef<T>

@KrzysztofCwalina
Copy link
Member

I don't mind renaming Span to Memory (although I don't think the value of the rename is very large or any).
I definitely don't like renaming Memory to MemoryRef. MemoryRef sounds like some plumbing magic that should be avoided.

@AlgorithmsAreCool
Copy link
Contributor

I had a notion today that perhaps Block<T> might be a decent name that is less overloaded than Span. Or of course Buffer<T>.

@ahsonkhan
Copy link
Contributor Author

We have already renamed Memory<T> to Buffer<T> while keeping Span<T> as is. Shall we close this issue?
https://github.com/dotnet/corefxlab/blob/master/src/System.Buffers.Primitives/System/Buffers/Buffer.cs#L13

@KrzysztofCwalina, @shiftylogic

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.0.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 25, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api-needs-work API needs work before it is approved, it is NOT ready for implementation area-System.Memory design-discussion Ongoing discussion about design without consensus
Projects
None yet
Development

No branches or pull requests

5 participants