JuliaLang / julia

The Julia Programming Language
https://julialang.org/
MIT License
45.4k stars 5.45k forks source link

Impossible to find ... (splat operator) in documantation #36496

Open pauljurczak opened 4 years ago

pauljurczak commented 4 years ago

As a newbie user I found this example on stackoverflow:

min(a...)

and I run to consult online documentation. Searching with ... is returns pages, which don't contain .... Searching with "..." is equally bad, as it returns https://docs.julialang.org/en/v1.6-dev/base/base/#ans as the first match, followed by other unhelpful ones. Searching the pdf version of documentation returns enough clues to find the operator name and more details.

If there is an advanced search query syntax helpful in this case, perhaps a paragraph about it at the beginning of the manual (https://docs.julialang.org/en/v1.6-dev/manual/getting-started/) would help. A mention about pdf version would be useful.

Additionally, avoiding passages like: In the following examples "..." is used to illustrate an arbitrary docstring. would make the search easier.

johnnychen94 commented 4 years ago

FYI, another way of searching these symbols is using the help mode in REPL:

# hit ? to enter help mode
help?> ...
search:

  ...

  The "splat" operator, ..., represents a sequence of arguments. ... can be
  used in function definitions, to indicate that the function accepts an
  arbitrary number of arguments. ... can also be used to apply a function to a
  sequence of arguments.

Also, if you don't know how to type symbols like , it tells you, too:

help?> ≤
"≤" can be typed by \leq<tab>

search: ≤

  <=(x, y)
  ≤(x,y)

  Less-than-or-equals comparison operator. Falls back to (x < y) | (x == y).
fingolfin commented 3 years ago

See also https://github.com/JuliaDocs/Documenter.jl/issues/1457 (resp #38238)