-
-
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
Moar keywords #25188
Comments
Nice! It would be helpful if you included the arguments that you think should be keywords as well. |
Btw, I would focus on Base itself since stdlib packages can have API changes post-1.0. |
Ok, I've updated with the names of the keyword arguments and seperated out stdlib |
If this list looks good to people I can make a pull request |
Thanks for going through all of these! Here's my assessment. These I fully agree with:
These I have comments on:
Disagree – what would the second argument be if not a filter of some kind? And calling it
Agree, this needs a better name than showparents, maybe just
Agree, maybe call it
I suspect that the method with
Agree, but I think these functions should be renamed to
Agree, but if so, we should consider making
This is not a great argument name or interface. Maybe just pass
There's an old issue and PR for this – worth looking at because they have the correct defaults but got torpedoed at the time since we couldn't make them work because of no-longer-relevant keyword evaluation order issues.
I would call these
Good to fix.
Agree, but call it
Don't bother fixing these since Pkg3 changes this anyway. |
I've been meaning to open an issue for
This has peeved me for eternity, and just makes these signature icky. Interestingly, the default value for |
For better or worse, |
@bramtayl: are you planning on making a PR for these changes? Let's not let the linalg keyword name stop anything here since that's not going to remain in Base anyway. |
Yeah I got about half way through following your recommendations. I can try to finish up tomorrow. |
Please leave out the linear algebra changes. I'm looking into those changes. I think we can clean up things quite a bit by utilizing constant propagation. Regarding |
Unfortunately, it doesn't seem like constant propagation works with keyword arguments. @vtjnash do you think constant propagation will ever work with keyword arguments? We'll probably have to choose between |
I won’t say never, but likely not anytime soon. |
Given that, I would say the best approach would be one where we use an API such that we can migrate to the nicer API once it's performant, leaving the old one as a vestigial but still usable API. |
Hmm, constant propagation doesn't seem to be surviving splats/slurps either :( Edit: nope, just slurps |
That's pretty much expected unless the splats are really just shorthand for something you could write out explicitly, it's not really going to be possible for the compiler to analyze it sufficiently. |
Sorry getting off topic here, but
it seems the pure annotation is needed to get constant propagation to work with lispy tuple programming. |
It seems like with constant propagation |
It looks like |
I'm not sure about changing the name here. |
Part of #20402
I've gone through the standard library section of the docs and chosen all the functions which I think have an optional argument that should be a keyword argument now that keywords are fast.
Warnings:
The text was updated successfully, but these errors were encountered: