? .!= --- looking up symbols/shortcuts in the documentation

While reading code of other programmers I often comes across symbols and syntax that I do not understand and that is (at least for me) not easy to find in the documentation. Here are three examples from the JuliaDBMeta-documentation:

@transform_vec t {:a .+ 1}
@with t :b .= :b .* string.(:a)
@where_vec t (:a .>= 2) .& (:b .!= "y")

In each of these lines a period (‘.’) were used with either + or > or !=.

help?> .+
search: .+

  No documentation found.

  Base.:.+ is a Function.

  # 1 method for generic function "(::#717)":
  (::Base.##717#718)(a, b) in Base at deprecated.jl:354

So how can I learn from the documentation what the difference between

+

and

.+

is if I cannot look it up in some index or keyword search?

1 Like

The . is a basic syntactic building block for broadcasting, not an operator itself; it just makes functions (eg +) broadcast. See the manual.

Thanks that helps with this immediate problem. But that illustrates my problem. I did not know what to search for in the documentation.

1 Like

While the interactive help system (?, apropos) is extremely useful, it is a complement, not a substitute, to reading the manual.

I wonder if we could still make ?.+ work and give an explanation or at least a link to the part of the manual on broadcasting. Currently it just gives the (absent) documentation for the old deprecated version of that function, but that deprecation will be gone in 0.7.

3 Likes

Check out
https://docs.julialang.org/en/latest/base/punctuation/

1 Like