-
-
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
consider consistently using ! for mutating functions #907
Comments
I think the same, actually... I was thinking in open an issue like this! I'm opened this topic on julia-dev: |
"returning the modified input...is inefficient": Prove it. |
I'm not sure where the idea that returning the array is inefficient comes from, but that's just not the case. |
I do a very simple test for
And the results are:
But, I still think that the names need to be ending in |
I'm proposing the following renames:
As a transitional step, the old versions will be kept around with warnings. |
Good!! 👍 I think deleteall! is better than clear! [ clear! gives the idea of deletion of data but maintain the structure (type and size) ] |
Here are my notes from our discussion about !, especially how it relates to linear algebra. ! convention: constructor convention: linear algebra functions that might throw errors should be designed as follows: a high-level function chol(A) and/or chol!(A) that throws an error if there |
How can |
I was thinking |
@JeffBezanson wrote: This is not the case in lapack.jl and I think it could be too restrictive. The LAPACK functions return tuples typically with a matrix and error information and for example @StefanKarpinski |
This deprecates the non-! versions and prints a warning when they are used. It doesn't quite close out #907 but comes close. There are still a few lingering mutators like del_each that we may want to get rid of or rename somehow.
All done now, except for |
How are we feeling about |
I'm for it. |
I think we should consider both |
I like |
Oh, fair enough. Yeah, let's go with |
This is going to be the most vicious renaming ever. |
Is there a way to do this so all external uses of ref and assign don't break immediately? |
We could use |
How about a special I think it's easy enough to find all uses of |
E.g. rename
push
=>push!
, etc. Discussion here.The text was updated successfully, but these errors were encountered: