-
Notifications
You must be signed in to change notification settings - Fork 5
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
Slicing a read-only matrix does not provide a read-only vector #2
Comments
As you can see the package is not actively maintained as people did not really decide to start using it. Still - feel free to make a PR and I can make a release. Thank you! |
Hmmm... I was planning to use it, or at least support its usage in my package (which allows people to store all kind of arrays in a container). Should I worry about the package being incomplete in general? I suppose that since Julia doesn't really believe in immutability, I shouldn't fight on being uniodiomatic and settle for "strongly urging" people to avoid modifying things they shouldn't? If so, a pity - immutability is important for thread-safety, and I was planning on using this package to (mostly) ensure it in the relevant cases for people using the "normal operations". I realize people can always access Thanks :-( |
I guess what you write is indeed the core of the problem. The immutability is easily broken so people did not start to rely on this package as it does not give much benefit. Maybe use https://github.com/JuliaArrays/StaticArrays.jl as they can guarantee immutability (assuming your arrays are not super large). |
Oh, my arrays are definitely super-large... up to several GBs in size. I can enforce some immutability in the special case where I memory-map the arrays from disk files - I can't help but think that if Julia is successful (which I definitely wish it to be), it will discover that ignoring immutability will be an issue, since multi-threaded code is becoming more and more prevailent. And immutability is useful in general - even Python with its GIL (so effectively no multi-threading) supports a Oh well. Thanks for the quick response! |
maybe open an issue for this in Julia Base repo and CC me there as I agree :). |
I submitted JuliaLang/julia#42157 FWIW. |
As shown by:
I'd have expected a slize of a read-only array to also be a read-only array.
The text was updated successfully, but these errors were encountered: