Artful Computing

C

C was the language used to develop the Unix operating system at Bell Telephone laboratories. (The Linux operating system is often called a Unix look-alike, and though it does not share any core code, is also written in C, and essentially behaves in the same way.)

C has all the features required to create an interface to the computer hardware (something that Fortran programmers largely try to avoid), but was also a general purpose language with a relatively compact syntax. As mini-computers, "engineering workstations", and personal computers took off in the 1980s it became popular and has retained a role ever since, particularly for "system interface" programming (creating the general infrastructure that supports higher level computer applications - e.g. the communications protocols that support the Internet). This stuff still has to be done and so you still have to have a language like C.

The main disadvantage of C through the early part of its history was the absence of a true standard. Every computer manufacturer seemed to interpret its syntax slightly differently, so that moving a program written on one computer to another was often a fraught process, with divergent software behaviours. Furthermore, many programs written in C were intended to interact closely with the computer hardware (e.g. to prepare an email for transmission over a network, or to draw figures on a screen) so they were often built around the particular design of one line of computers.

C did, however, have one enormous advantage over earlier versions of Fortran in being able to change the amount of computer memory being used by a program during the course of its execution (so called "dynamic" memory). Unfortunately, that introduced a who new taxonomy of potential defects which were often easy to introduce and subsequently hard to find and eliminate. (It has been described for this reason as "the work of the devil".)

Even if we preferred to write our equation solvers in Fortran, we might write some parts of the program in C to tap into the dynamic memory capability and other system interface features as necessary. More importantly C had "Structures" - ways of assembling data of diverse types in packages that could travel round the program as units. (Fortran did not acquire this until Fortran 90 compilers came on the market in the mid 1990s.) As programs became more larger and more complex the structuring and management of information becomes more and more important so this was and is a crucial programming concept.

Many of the earlier libraries used to build graphical user interfaces were constructed in C (and still are) and so C can still be a language of choice for some types of application that uses GUIs extensively.

Breadcrumbs