The Object-Oriented Model

To understand why, let’s take a look at simplified computer memory. It consists of a series of eight memory cells, each of which holds a bit of information. Every cell has an address, which represents a place. You can reach into that place and change what’s there, but once you change it, any notion of what was there in the past is lost as shown in the figure.

images/MBL-images/SuperSimpleMemory.png

To change a value, the bit at a particular location is flipped. For instance, in the following dramatic re-enactment, we change the value at memory location 8 from 0 to 1.

This simplified model is similar to the model presented by even modern computer memory. ...

Get Functional Programming: A PragPub Anthology now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.