Skip to content

Commit

Permalink
Clarify syntax for qualified names of operators in manual (#19237)
Browse files Browse the repository at this point in the history
Clarify syntax for qualified names of operators
  • Loading branch information
H-225 authored and JeffBezanson committed Nov 6, 2016
1 parent 05ed40b commit 42a22b6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion doc/manual/modules.rst
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,13 @@ Namespace miscellanea
---------------------

If a name is qualified (e.g. ``Base.sin``), then it can be accessed even if
it is not exported. This is often useful when debugging.
it is not exported. This is often useful when debugging. It can also have
methods added to it by using the qualified name as the function name.
However, due to syntactic ambiguities that arise, if you wish to add methods
to a function in a different module whose name contains only symbols, such as
an operator, ``Base.+`` for example, you must use ``Base.:+`` to refer to it.
If the operator is more than one character in length you must surround it in
brackets, such as: ``Base.:(==)``.

Macro names are written with ``@`` in import and export statements, e.g.
``import Mod.@mac``. Macros in other modules can be invoked as ``Mod.@mac``
Expand Down

2 comments on commit 42a22b6

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Executing the daily benchmark build, I will reply here when finished:

@nanosoldier runbenchmarks(ALL, isdaily = true)

@nanosoldier
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your benchmark job has completed - no performance regressions were detected. A full report can be found here. cc @jrevels

Please sign in to comment.