Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 1.76 KB

1.1-the-elements-of-programing.md

File metadata and controls

19 lines (13 loc) · 1.76 KB

1.1 The Elements of Programming

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. Every powerful language has three mechanisms for accomplishing this:

  • 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. (Later we will discover that they are really not so distinct.) Informally, data is “stuff” that we want to manipulate, and procedures are descriptions of the rules for manipulating the data. Thus, any powerful programming language should be able to describe primitive data and primitive procedures and should have methods for combining and abstracting procedures and data.

In this chapter we will deal only with simple numerical data so that we can focus on the rules for building procedures.

1.1.1. Expressions
1.1.2. Naming and the Environment
1.1.3. Evaluating Combinations
1.1.4. Compound Procedures
1.1.5. The Substitution Model for Procedure Application
1.1.6. Conditional Expressions and Predicates