RFC: Make )x call methods(x) at repl #4357
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I find myself typing
methods
a lot after #4344, but I see the argument for the new behavior, especially in non-command-line environments. This PR makes)
a shortcut formethods
in the REPL, just as?
is a shortcut forhelp
.I have no particular affinity for
)
. I chose it because it should always be invalid at the start of a block of code and it bears some relationship to a function call.Over the long term we will want to make sure that all forms of all methods in Base are documented and improve the help mechanism so that packages can tie into it (e.g. as in #1619), at which point this shortcut shouldn't really be necessary. But since this is just repl syntax it shouldn't break anything if we deprecate/remove it at a later date.