Home > Notes > Books > Notes and Solutions from Structure and Interpretation of Computer Programs

3 Modularity, Objects, and State

Preceeding chapters: introduced basic elements (procedures + data => compound entities). Abstraction is vital.

We also need strategies for structuring large systems to be modular.

One strategy, base the program structure on the physical system being modeled.

This chapter investigates two strategies arises from two different "world views":

1. Concentrate on objects, view a large system as a collection of distinct objects with behaviors that change over time.

2. Concentrate on streams of information that flow in the system.

For 1), must be concerned with how a computational object can change but maintain its identity. A fundamental consequence of grappling with time in our computational model. Espeically when we allow concurrent execution.

For 2), best to decouple simulated time from the order of events in computer during evaluation. This uses a technique called delayed evaluation.

Previous Next