Summary
This chapter has introduced what is the start of the object-oriented programming paradigm. This builds upon the foundation we have established in understanding how structs, functions and procedures work, and pointers work. These new features allow us to start seeing larger entities in our code - objects that know and can do things. We have looked into how this works, and you should be able to see how this is implemented by the compiler. At a code organisation level, objects are just a convenient way of getting the compiler to pass the context (a this
struct pointer) into the methods for us. This simple change helps better connect these entities in our code (our structs) with the logic that acts upon them (the methods).
The remaining chapters in Part 2 will focus on the procedural programming paradigm, and we can come back to objects again in Part 3.