SICP notes
I want to create some notes that I take when I'm reading the SICP book.
I'm not intending to solve the entirity of the book, instead, I want to read thorugh the book and make notes that will allow me to skim the chapters easily.
-
primitive expressions, which represent the simplest entities the language is concerned with,
-
means of combination, by which compound elements are built from simpler ones, and
-
means of abstraction, by which compound elements can be named and manipulated as units.
-
In programming, we deal with two kinds of elements: procedures and data
-
A critical aspect of a programming language is the means it provides for using names to refer to computational objects. We say that the name identifies a variable whose value is the object.
- Applicative order versus normal order
The interpreter first evaluates the operator and operands and then applies the resulting procedure to the resulting arguments
Not evaluate the operands until their values were needed. Instead it would first substitute operand expressions for parameters until it obtained an expression involving only primitive operators, and would then perform the evaluation.
A formal parameter of a procedure has a very special role in the procedure definition, in that it doesn’t matter what name the formal parameter has
If a variable is not bound, we say that it is free. The set of expressions for which a binding defines a name is called the scope of that name.
A procedure is a pattern for the local evolution of a computational process. It specifies how each stage of the process is built upon the previous stage. We would like to be able to make statements about the overall, or global, behavior of a process whose local evolution has been specified by a procedure. This is very difficult to do in general, but we can at least try to describe some typical patterns of process evolution.
The expansion occurs as the process builds up a chain of deferred operations (in this case, a chain of multiplications). The contraction occurs as the operations are actually performed. This type of process, characterized by a chain of deferred operations, is called a recursive process. Carrying out this process requires that the interpreter keep track of the operations to be performed later on.
In general, an iterative process is one whose state can be summarized by a fixed number of state variables, together with a fixed rule that describes how the state variables should be updated as the process moves from state to state and an (optional) end test that specifies conditions under which the process should terminate.
referring: https://github.com/ivanjovanovic/sicp