Game Development Reference
In-Depth Information
2.3.1 The Early Days: Imperative Programming
A large group of programming languages belongs to the imperative paradigm .
Therefore we call these languages imperative languages . Imperative languages are
based on instructions to change the memory. As such, these languages are very well
suited to the processor-memory model we described in the previous section.
In the early days, computers were programmed by writing the instructions di-
rectly as numbers in memory, where each number corresponded to a certain type of
instruction. People soon realized that it was more convenient to use abbreviations
for these instructions, instead of numbers, since these are a lot easier to remem-
ber. So, around 1950 the first (imperative) programming language was created. This
language was called Assembler , because it could be used to 'assemble' programs
easily. However, because every processor had different kinds of instructions, each
of these processors had their own version of the Assembler language. This was not
very practical, because every time a new processor came around, all the existing
programs had to be completely rewritten for that processor. Therefore, in 1955 the
language Fo r t r a n (an abbreviation of 'formula translator') was created. The nice
thing about this language was that the instructions in the language were not made
specifically for a certain processor, but they could be translated to different proces-
sors by another program.
Declarative programming— The fact that we took the effort to identify the
paradigm of imperative programming languages implies that there are other
programming paradigms which are not based on instructions. Is this possi-
ble? What does the processor do if it does not execute instructions? Well,
the processor always executes instructions, but that does not mean that the
programming language contains them. For example, suppose that you build a
very complicated spreadsheet with many links between different cells in the
sheet. You could call this activity 'programming', and the empty spreadsheet
is the 'program', ready to process actual data. In this case, the 'program' is
not based on instructions, but on functional links between the cells. Next to
these functional programming languages there are languages based on propo-
sitional logic—the logical programming languages —such as Prolog. These
two types of programming languages together form the declarative paradigm .
Fortran was not an easy language to learn. Initially, this was not really a problem
because computers at that time were operated only by specially trained personnel.
However, as time progressed, a need started to emerge for a language that was easier
to use. So, around 1965, a new language was created called Basic ('Beginners' All-
purpose Symbolic Instruction Code'). This language became very popular in the
1970s, because it came with the early personal computers such as the Apple II in
1978 or the IBM-PC in 1979 and their descendants. Unfortunately this language
was not standardized, so every computer brand used its own dialect of Basic.
Search WWH ::




Custom Search