Structure and Interpretation of Computer Programs

Textbook

Structure and Interpretation of Computer Programs, 2e: Top

1 - Building Abstractions with Procedures

1.1 - The Elements of Programming

Every language has three mechanisms to combine simple ideas into more complex ones

  1. Primitive Expressions - Represent the simplest entities the language is concerned with
  2. Means of Combination - Compound elements are built from simpler ones
  3. Means of Abstraction - Compound elements can be named and manipulated as units

Kinds of elements

  1. Procedures
  2. Data

1.1.1 - Expressions

A simple expression might be

> 486
486

The interpreter simply returns what was given as input, in this case 486.

Expressions may be combined with primitives as well to produce new results.