Understanding module partitions
The source code of a module may become large and difficult to maintain. Moreover, a module may be composed of logically separate parts. To help with scenarios such as these, modules support composition from parts called partitions. A module unit that is a partition that exports entities is called a module interface partition.
However, there could also be internal partitions that do not export anything. Such a partition unit is called a module implementation partition. In this recipe, you will learn how to work with interface and implementation partitions.
Getting ready
You should read the previous recipe, Working with modules, before continuing with this one. You will need both the module fundamentals we discussed there and the code examples that we will continue with in this recipe.
How to do it...
You can split a module into several partitions as follows:
- Each partition unit must start with a statement of the form
export...