-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Rename Memory wrapper from view
to unsafe_vector
#54273
Conversation
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
view
andunsafe_vector
is that the result ofview
has 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 usingMemory
it may be hard to tell ifview
is 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
view
on aMemory
should produce anArray
.