Book contents
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 Core features
- 3 Advanced features
- 4 Parser builders
- 5 XML processing
- 6 GUI programming
- 7 Concurrent programming
- 8 On paths and a bit of algebraic abstraction
- 9 Virtual files coming into existence
- 10 Compositional file matching
- 11 Searching, iterating, traversing
- 12 The expression problem
- 13 A computer algebra system
- Appendix A Multimedia processing
- Appendix B Distributing a Scala application along with Scala itself
- Appendix C Working with the compiler and the interpreter
- Appendix D Scala's grammar
- References
- Name index
- Subject index
8 - On paths and a bit of algebraic abstraction
Published online by Cambridge University Press: 05 June 2012
- Frontmatter
- Contents
- Preface
- 1 Introduction
- 2 Core features
- 3 Advanced features
- 4 Parser builders
- 5 XML processing
- 6 GUI programming
- 7 Concurrent programming
- 8 On paths and a bit of algebraic abstraction
- 9 Virtual files coming into existence
- 10 Compositional file matching
- 11 Searching, iterating, traversing
- 12 The expression problem
- 13 A computer algebra system
- Appendix A Multimedia processing
- Appendix B Distributing a Scala application along with Scala itself
- Appendix C Working with the compiler and the interpreter
- Appendix D Scala's grammar
- References
- Name index
- Subject index
Summary
It is quite probable that most of us are not consciously aware of an ever-appearing design pattern, which goes far beyond the design patterns in the normal sense of [24]. This pattern has to do with how we organize our data and, sometimes as a consequence, how we access these data. What we are talking about is the hierarchical data organization pattern that we can abbreviate in short as: Hierarchies are everywhere!
A file system is the canonical example of hierarchical organization. Its structure is a collection of files and directories, with the directories playing the role of containers for other files and/or directories. The Unix tradition has more to say about files, since the file system “pattern” has been extended to support other use cases than the traditional ones. For example, in Linux, /proc is a special mounted file system which can be used to view some kernel configuration and parameters. In fact, normal file system I/O calls can be used to write data into this special file system, so that kernel and driver parameters can be changed at runtime.
XML advocates will feel pleased to recognize that XML has been promoting such hierarchical organization. We are not sure how many of them were aware of the real essence of the general “Hierarchies are everywhere” pattern mentioned above, but the pattern itself is ubiquitous. Strangely enough, hierarchical databases have not survived, but probably XML strikes back on their behalf.
- Type
- Chapter
- Information
- Steps in ScalaAn Introduction to Object-Functional Programming, pp. 307 - 333Publisher: Cambridge University PressPrint publication year: 2010