Skip to content

Conversation

@simonster
Copy link
Member

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 for methods in the REPL, just as ? is a shortcut for help.

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.

@stevengj
Copy link
Member

I have to say I find )foo a little weird. How about ??foo?

In IJulia, typing foo( and then tab will bring up methods(foo) in a pop-up.

@StefanKarpinski
Copy link
Member

I agree that this is a bit weird as a syntax. I'd rather make ?foo a special syntax for help and maybe include a full methods list in it. This is a lot less of an issue in IJulia since there's automatic method listing when you've typed foo( there's no reason we can't implement that kind of tab completion in our REPL, which would make this issue to away.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants