I am new to Julia and working on a project written in Julia.
What are uses/significance of “@” and “!” in Julia?
@
is used for macro names in macro invocations. !
is just a habit to show that the function will change a mutable input.
4 Likes
!
can also mean something else than the aforementioned convention:
julia> @doc !
!(x)
Boolean not. Implements three-valued logic (https://en.wikipedia.org/wiki/Three-valued_logic), returning
missing if x is missing.
See also ~ for bitwise not.
Examples
≡≡≡≡≡≡≡≡≡≡
julia> !true
false
julia> !false
true
2 Likes