Intermediate Objects

Jonathan Bartlett · Apress eBooks · 2022

So far, we have created objects that just contain data. Objects that just contain data are sometimes known as records—they store data, but they don’t do anything. In Chapter 11 , we wrote functions that manipulated these records. If you want to perform an action (such as withdrawing funds from an account), you would call the appropriate function, and it would do what you want. This is a fine programming style and works well for many situations. However, as programs get larger and more complex, it is beneficial to make the functions that operate on the objects more tightly connected to the objects themselves.

Read the paper · More papers on PaperTik