-
-
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
Proposal to use map!(f,A) for in place modification of collections #31677
Comments
FWIW, I think we should get rid of all the "nullary" methods of |
It's also pretty easy to get the "nullary" behaviour if you want it like this: |
FYI #35293 is an RFC for gettring rid of |
I think we should do both that and this. We could try it and if it breaks any package, reconsider, but I bet it won't. |
Triage says we should do this; there's really no other sensible interpretation of |
Implemented by #40632 |
I have been working through some of the JuliaCollection packages working to make sure that
map!(f,values(dict))
has non-naive implementations. As the semantic was introduced in #31223.Which got me thinking that potentially
map!
should be implemented on more of the nonAbstractDict
collection\container types as it could be useful.For those types that just store values without keys, it would make sense that
map!(f, collection)
is the syntax. But apparently, that exact syntax was depreciated in #19721. There is an open PR to add it back in forAbstractArray
, #3007.There are some related open issues like:
#12277
It seems to me that
map!(f, A)
should clearly be equivalent tomap!(f,A,A)
so can the ecosystem use that?Finally, if ecosystem packages implement
map!(f,A)
for in place value modification, is there a way to make sure that whenmap!(f,A,A)
is used it can get a fall back tomap!(f,A)
?The text was updated successfully, but these errors were encountered: