Modularity
The Julia code is organized into files, modules, and packages.
One or more modules can be stored in a package, and these are managed using the Git version control system. Most Julia packages, including the official ones distributed by Julia, are stored on GitHub, where each package, conventionally, has a .jl
or .
jl.git
extension.
We will be discussing the use of Git in the last chapter of this book.
We saw in the first chapter that packages are managed by use of the new Julia package manager, which was introduced in version 1.0, and via the use of the interactive shell mode on how to add, update, and remove them.
In addition, there is also a separate programmable API mode (via the Pkg module), which can be used for similar operations, and the two are completely equivalent.
We saw a few examples of Julia modules in the preceding chapters, but it is recommended to take a little time to focus on some general aspects of Julia modules:
- Modules in Julia...