One issue I have with Julia is remembering the name of functions and what they do. In a typical OOP language and IDE/editor typing the name of an object and then the dot character a pop-up window will produce a list of all available functions and their documentation. In VS Code is there some facility to help with this issue?
If I understand correctly, this is a quite general problem given how multiple dispatch creates a large number of possible operations on a given type. I remember reading a discussion about the same issue here:
It’s already a few years old, so I’m not sure if there are some new developments in VSC since then, but maybe you find
Also just found this (haven’t looked at the suggestions in detail yet, but sounds like it could be usefule as well):
Also note that entering a word in quotes within the help mode (which triggers the
InteractiveUtils.apropos function) gives you a list of all the methods in whose docstrings said word appears.
The problem is that one may not even know what function name to look for but only that he wants to find a function that does something specific and it is applicable to a datatype of interest.
Perhaps, an AI-based search system could do the job using as input the functionality a user is looking for (typed words) and the datatype of interest, using for the search the available documentation.
That’s why I like
apropos: if your function does “something specific”, the something specific may not be in the function name but it has more likelihood of popping up in the function docstring
– and in which package is it contained
Here, asking the question is probably currently the best way. But you are right, this is the case where AI could be very helpful.
I believe @xgdgsc has a working proof-of-concept of postfix completion, which lets one still use the dot syntax for autocomplete. See Allowing the object.method(args...) syntax as an alias for method(object, args ...) - #218 by xgdgsc. Last I checked, they were still trying to upstream it into the VS Code extension and Julia language server.
That completion user interface is quite unintuitive, it seems like it would completely confuse anyone who doesn’t know about this specific feature. Wouldn’t it be all-around much better to have a new window pop up or something like that?
You can also use methodswith(typeof(object)) to list all methods that take any argument of that type (whether or not it is the first argument).
Please, do not. I still hate R for forcing our lab servers to install a full graphic environment just so someone can select the mirror during the first run.
I’m talking about the proposed VS Code PR. Pretty sure that Code requires a graphical environment anyway.