Basic Elements of Programming


Improve your writing skills in 5 minutes a day with the Daily Writing Tips email newsletter.

I am reading the SICP (Structure and Interpretation of Computer Programs) book right now, and I am impressed with the elegance and clarity in which the authors explain most concepts.

For instance, “A powerful programming language is more than just a means for instructing a computer to perform tasks. The language also serves as a framework within which we organize our ideas about processes. Thus, when we describe a language, we should pay particular attention to the means that the language provides for combining simple ideas to form more complex ideas.”

After that the authors describe the three mechanisms that programming languages have for this purpose:

1. Primitive elements and expressions (the basic elements of a language, usually numbers and arithmetic operations)
2. Means of combination (the possibility to combine basic elements and expressions into compound ones)
3. Means of abstraction (the possibility to name and manipulate compound elements as single units)

As you probably know computer programs have two basic elements: procedures and data. An example of primitive data would be integers, say 5 and 10, and an example of a primite procedure would be the addition operation.

We can combine those to form an expression like this (in Lisp):

(+ 5 10)

Or something more complex like this:

(+ (* 3 10) (*4 20))

Finally, we can create our own procedures and data structures to build abstractions, which enables us to create programs at a higher conceptual level.

Leave a Reply

Your email address will not be published. Required fields are marked *