Skip to content
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

don't tab complete deprecated functions #4496

Closed
StefanKarpinski opened this issue Oct 12, 2013 · 6 comments
Closed

don't tab complete deprecated functions #4496

StefanKarpinski opened this issue Oct 12, 2013 · 6 comments
Labels
REPL Julia's REPL (Read Eval Print Loop)

Comments

@StefanKarpinski
Copy link
Member

It would be really nice if we didn't offer tab completions for functions defined in deprecated. I'm not sure if this is feasible, but since tab completion is a great way to discover things, it's weird when so many things that it reveals are not recommended.

@lindahua
Copy link
Contributor

Whereas this is a good idea, implementation can be problematic.

The problem is that deprecated function is no more than an ordinary function with an warning statement generated by the macro. I am not sure whether there is a programmatic way that can tell "whether a function is deprecated or not".

Also some function is partly deprecated, that is, only deprecated on some combinations of argument types. For such functions, it is still desirable to tab complete the function name. This adds to the complexity of the situation -- we want to know whether the function is completely deprecated.

@JeffBezanson
Copy link
Member

Hack: when a function is deprecated using

@deprecate  f  g

it is entirely deprecated, and in that case we could add it to a deprecated list.

@StefanKarpinski
Copy link
Member Author

We could have a DEPRECATED global array and have the @deprecate macro stick a function name in there if the function wasn't already defined. Then tab completion would just filter out things that are in the DEPRECATED list.

@lindahua
Copy link
Contributor

I am not asking to implement this currently, but is it possible to allow attaching metadata to types and functions (in future)? Just like Java's annotation or C#'s attributes. So that people can attach attributes/annotations/what-ever-you-call-it to these things and write programs to inspect them.

@JeffBezanson
Copy link
Member

Dup of #3526

@StefanKarpinski
Copy link
Member Author

Well, I may not have the best memory, but at least I'm consistent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
REPL Julia's REPL (Read Eval Print Loop)
Projects
None yet
Development

No branches or pull requests

3 participants