January 2019
Intermediate to advanced
320 pages
9h 18m
English
This chapter covers
const to enforce immutabilityWe touched on the topics of immutability and pure functions in chapter 1. I said one of the main reasons for the existence of bugs is that it’s hard to manage all the states a program can be in. In the object-oriented world, we tend to approach this issue by encapsulating parts of the program state into objects. We hide the data behind the class API and allow modification of that data only through that API.
This allows you ...
Read now
Unlock full access