The Lisp Programming Environment

Summary: Common Lisp defines a large, platform independent library of utilities, various debugging facilities, and a means for being extended. All of these facilities are available during development, and if desired, in "completed" applications as well.
prev next

site map



The Common Lisp standard is huge. Proponents of other Lisp dialects such as Scheme point out that their standards are shorter than the index to the Common Lisp standard. The reason it is so large is that it defines a very complete, well integrated, library of utilities. This includes:

  • data objects which contain run-time type information
  • about 100 well defined mathematical functions operating on many number types including:
    • unlimited precision integers (which do not overflow)
    • rational numbers (which do not suffer from round-off errors)
    • complex numbers
  • powerful arrays which can be:
    • heterogeneous (i.e. can store different types of data at once)
    • dynamic (i.e. can grow or shrink as necessary)
    • displaced (i.e. can reference other arrays of possibly different rank)
    • Do proper bounds checking.
  • list data types which can be grown or shrunk more efficiently than arrays, and are particularly useful for representing trees, queues, etc.
  • hash tables for efficiently storing large data sets referenced using any object as a key rather than only integer indices.
  • polymorphic functions which operate, for example, on any kind of sequence, including strings, lists, and various kinds of one dimensional arrays (including heterogeneous lists and vectors)
  • a powerful, customizable, and ANSI standardized reader, printer and stream I/O system. The printer can print any program data in a formatted program- or human-readable form, without requiring the programmer to identify the format of the data to printed. This is especially usefull for debugging and creating scripts.
  • a powerful, customizable, and ANSI standardized error signaling system
  • a well founded, consistent, ANSI standardized, platform independent set of system tools including logical pathnames, timing and date utilities, etc.
  • powerful function definition facilities, including:
    • Compiled functions which can be redefined at run time.
    • Closures. These are nested function definitions which can refer to local variables and labels of the function in which they were defined. Unlike the lexical functions provided by some C extensions, Lisp closures can be returned from functions and still be called. (I.e. they have indefinite extent.)
    • Named arguments (i.e. keyword arguments)
    • Generic Functions (dynamic polymorphism)
    • Functions which return multiple values.
  • sophisticated control structure, including:
    • lexical exits (i.e. returns) which are properly integrated with closures.
    • go labels which are are properly integrated with closures.
    • dynamic exits (i.e. catch/throw).
    • dynamic binding (and unwinding) of global variables.
    • unwind-protection, in which clean up code from a pending caller is guaranteed to be executed -- even if control is transferred due to an error, a lexical or dynamic exit, or a "go"

While less powerful and ad-hoc versions of some of these utilities have been added or are being added to C, C++, and Java, only Common Lisp defines them all in an integrated, well reasoned, ANSI standardized manner.

The standard requires that all these utilities be present in an interactive environment which allows code to be developed and debugged. Applications may be run from within this environment, sometimes using utilities from other languages as well.

Many implementations also provide the ability to create stand-alone applications which do not use the entire library, but only those parts that are accessed by the application. This task is sometimes made more complicated by the dynamic nature of Lisp, which can make it difficult to determine what utilities will actually be used at run-time.