Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
Chapter 29 Modular Programming Using Objects In Chapter 1, we claimed that one way Scala is a scalable language is that you can use the same techniques to construct small as well as large pro- grams. Up to now in this book we've focused primarily on programming in the small: designing and implementing the smaller program pieces out of which you can construct a larger program. 1 The other side of the story is programming in the large: organizing and assembling the smaller pieces into larger programs, applications, or systems. We touched on this subject when we discussed packages and access modifiers in Chapter 13. In short, packages and access modifiers enable you to organize a large program using packages as modules, where a module is a "smaller program piece" with a well defined interface and a hidden implementation. While the division of programs into packages is already quite helpful, it is limited because it provides no way to abstract. You cannot reconfigure a