-
-
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
read!() and readbytes!() mutate their second argument #14412
Comments
It's true that in-place functions mutate their first argument, but IO methods takes an optional (The |
I think @ivarne is correct, which convention takes precedence. |
I agree that |
the mutation of the first argument is common (since it often appears when used for container-semantics and oo-semantics), but I don't think it was ever intended that should be used as a rule. for example, i believe most of the linalg is there a place this needs to be documented better (e.g. when |
To be honest, I haven't read this anywhere (or I don't recall it). No worries. |
I thought the convention was that in-place versions of functions mutate their first argument. It looks like we could easily change the argument order and print deprecations if we want to enforce this convention.
Though the
rand*!
family of functions also doesn't follow this rule, so maybe we should just give up on consistency.The text was updated successfully, but these errors were encountered: