The Problem With Immutable Objects
Let’s find out about the problem we face with immutable objects in this lesson.
We'll cover the following...
The costs associated with immutable objects
Although immutable objects solve a lot of problems with accidental modification of data as it is passed around in a program, it comes at a cost:
- You may need to jump through a few hoops if you need to process the data.
- You may end up making several copies of the data.
In many cases, it is worth using immutable data wherever possible for the sake of robustness. The main exception is for processing ...
Access this course and 1400+ top-rated courses and projects.