Rename Memory wrapper from view to unsafe_vector#54273
Rename Memory wrapper from view to unsafe_vector#54273nhz2 wants to merge 2 commits intoJuliaLang:masterfrom
view to unsafe_vector#54273Conversation
|
If this gets approved, it might be worth adding a "See also:" reference to |
|
Nit: nothing about this is unsafe, so we could call it |
|
wasn't it originally I might be conflating issues together, didn't follow super closely |
|
Isn't |
|
This would surely break CSV.jl, as the removal of wrap did before. I don't have a strong opinion on this, but I'm commenting to know when/if this PR is merged to add the corresponding fix |
|
Triage named it I don't really understand what the |
|
How about naming it |
|
"Base.wrap" doesn't seem like it means anything in particular, it's too uninformative. At least that was my view and I think triage agreed. |
|
Closing as discussed in #54372 (comment) |
Fixes #54156
Changes part of #53896
The main difference between
viewandunsafe_vectoris that the result ofviewhas a fixed size, and creates a copy when passed toString.The
String(view(pattern is fairly common: https://juliahub.com/ui/Search?q=String(view&type=code and as more packages start usingMemoryit may be hard to tell ifviewis being used safely or not.I'm not sure about the name
unsafe_vector, but the docstring saysSo I added an
unsafe_prefix.Ref #53552 (comment) for a discussion on why
viewon aMemoryshould produce anArray.