Structure and Interpretation of Computer Programs
Textbook
Structure and Interpretation of Computer Programs, 2e: Top
1 - Building Abstractions with Procedures
- Computational processes manipulate data. The pattern of rules around this is called a program.
- Using Lisp (Scheme)
1.1 - The Elements of Programming
Every language has three mechanisms to combine simple ideas into more complex ones
- Primitive Expressions - Represent the simplest entities the language is concerned with
- Means of Combination - Compound elements are built from simpler ones
- Means of Abstraction - Compound elements can be named and manipulated as units
Kinds of elements
- Procedures
- 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.