About | Buy | Forum | Industry Watch | Learning Curve | Products | Search | Twitter | Xnews
Home » Learning Curve » Developers Workshop

The Fatal Trap

There is no escape.


Buy It

Try It

The following was published by Brian Kernighan of Bell Laboratories on 2 April 1981. The full paper is available here.

To close, let me summarize the main points in the case against Pascal.

  1. Since the size of an array is part of its type, it is not possible to write general-purpose routines, that is, to deal with arrays of different sizes. In particular, string handling is very difficult.
  2. The lack of static variables, initialization and a way to communicate non-hierarchically combine to destroy the 'locality' of a program - variables require much more scope than they ought to.
  3. The one-pass nature of the language forces procedures and functions to be presented in an unnatural order; the enforced separation of various declarations scatters program components that logically belong together.
  4. The lack of separate compilation impedes the development of large programs and makes the use of libraries impossible.
  5. The order of logical expression evaluation cannot be controlled, which leads to convoluted code and extraneous variables.
  6. The 'case' statement is emasculated because there is no default clause.
  7. The standard I/O is defective. There is no sensible provision for dealing with files or program arguments as part of the standard language, and no extension mechanism.
  8. The language lacks most of the tools needed for assembling large programs, most notably file inclusion.
  9. There is no escape.

This last point is perhaps the most important. The language is inadequate but circumscribed, because there is no way to escape its limitations. There are no casts to disable the type-checking when necessary. There is no way to replace the defective run-time environment with a sensible one, unless one controls the compiler that defines the 'standard procedures'. The language is closed.

People who use Pascal for serious programming fall into a fatal trap.

About | Buy | Forum | Industry Watch | Learning Curve | Products | Search | Twitter | Xnews
Copyright © Rixstep. All rights reserved.