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

Show similar functions in docstrings #23763

Open
ChristianKurz opened this issue Sep 19, 2017 · 3 comments
Open

Show similar functions in docstrings #23763

ChristianKurz opened this issue Sep 19, 2017 · 3 comments
Labels
docs This change adds or pertains to documentation good first issue Indicates a good issue for first-time contributors to Julia help wanted Indicates that a maintainer wants help on an issue or pull request

Comments

@ChristianKurz
Copy link
Contributor

I think discoverability would be greatly enhanced, if there would be some hints at similar functions in the docstrings.
I imagine a line of See also: ...function names... which should be generated from a table of related functions automatically.

This came to my mind when looking at the docs of pop!. The functions shift! and splice! offer solutions to similar problems, but their names cannot be guessed from each other.

pop!(collection, key[, default])

  Delete and return the mapping for key if it exists in collection, otherwise return default, or
  throw an error if default is not specified.

[...]

See also: shift!(), splice!()

Of course, the wording is open for bike shedding 👍

@KristofferC
Copy link
Member

There is already that in a bunch of places. Feel free to make PR with more of them.

@nalimilan nalimilan added the good first issue Indicates a good issue for first-time contributors to Julia label Sep 19, 2017
@nalimilan
Copy link
Member

That would be great. The manual could also be updated to suggest a standard wording for the section at https://docs.julialang.org/en/stable/manual/documentation/

@fredrikekre fredrikekre added docs This change adds or pertains to documentation help wanted Indicates that a maintainer wants help on an issue or pull request labels Sep 20, 2017
@Seelengrab
Copy link
Contributor

Is the idea for an automatic generation of the See also part still viable or is the documentation hint added in #23788 sufficient?

Personally, I don't see the added benefit of such a function, since that mapping has to be added manually to a lookup table anyway (in which case adding it to the documentation directly should not be much more effort, no?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs This change adds or pertains to documentation good first issue Indicates a good issue for first-time contributors to Julia help wanted Indicates that a maintainer wants help on an issue or pull request
Projects
None yet
Development

No branches or pull requests

5 participants