In this chapter, we have looked at several patterns related to improving the readability and maintainability of an application.
First, we learned about when a module becomes too large and when it should be considered for reorganization. We realized that coupling is an important consideration when splitting code into separate modules. Next, we discussed the problem of constructing objects that have many fields. We determined that using a keyword-based constructor can make the code more readable and can provide additional flexibility of supporting default values. We learned that the Julia Base module already provides a macro.
Then we explored how to do code generation, which is a convenient technique for dynamically defining many similar functions without having to repeat the code. We picked up a utility from CodeTracking to review the generated source code.
Finally, we...