Chapter 2
How do we create a new namespace?
A namespace is created using a module block. Typically, a module is defined as part of a Julia package.
How do we expose the functions of a module to the outside world?
Functions and other objects defined within a module can be exposed using an export statement.
How do we reference the proper function when the same function name is exported from different packages?
We can just prefix the function name with the package name. As an alternative, we can use a using statement for one package, and an import statement for the other, so that we can use the function name directly for the first package but use the prefix syntax for the other.
When do we separate code into multiple modules?
It is time to consider ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access