Lecture 26 Objectives
At the end of today's class you should
KNOW:
- That mutation complicates testing
- That when you have to backtrack or undo computation, creating new
objects is generally preferable to mutating existing objects
- That mutation introduces the notion of time into computation
- That the memory mapping of names to values is an implicit parameter
to every method
BE ABLE TO:
- Recognize when mutation is required
- Choose to use mutation or not based on the API you want to present to
clients of your code
Sample Exam Question: