3 Basic data manipulation
Meditation and programming
This chapter covers
- Representing records with string maps to improve flexibility
- Manipulating data with generic functions
- Accessing each piece of information via its information path
- Gaining JSON serialization for free
After learning why and how to separate code from data in the previous chapter, letâs talk about data on its own. In contrast to traditional OOP, where system design tends to involve a rigid class hierarchy, DOP prescribes that we represent our data model as a flexible combination of maps and arrays (or lists), where we can access each piece of information via an information path. This chapter is a deep dive into the second principle of DOP.
Principle #2 Represent data entities ...
Get Data-Oriented Programming now with the O’Reilly learning platform.
O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.