The recurring theme in this chapter is to learn how to improve and gain more control over the visibility and accessibility of data and functions in the public API. By enforcing the access of the programming interface, we can guarantee how the program is utilized. Additionally, we can focus on testing the interface as advertised.
Currently, Julia provides little help in encapsulating implementation details within a module. While we can use the export keyword to expose certain functions and variables to the other modules, it is not designed to be an access control or data encapsulation feature. You can always peek into a module and access any variable or function even when they are not exported.
In this section, we will continue the trend and go over some strategies that we can use to limit access to variables or functions in a module. Here, we will use...