Special forms in Lisp

  • Authors:
  • Kent M. Pitman

  • Affiliations:
  • -

  • Venue:
  • LFP '80 Proceedings of the 1980 ACM conference on LISP and functional programming
  • Year:
  • 1980

Quantified Score

Hi-index 0.00

Visualization

Abstract

Special forms are those expressions in the Lisp language which do not follow normal rules for evaluation. Some such forms are necessary as primitives of the language, while others may be desirable in order to improve readability, control the evaluation environment, implement abstraction and modularity, affect the flow of control, allow extended scoping mechanisms, define functions which accept a variable number of arguments, or achieve greater efficiency. There exist several long-standing mechanisms for specifying the definition of special forms: FEXPR's, NLAMBDA's and MACRO's. In this paper, the motivations for using special forms are discussed, followed by a summary of the advantages and disadvantages of employing MACRO's, FEXPR's, and NLAMBDA's as tools for their implementation. It is asserted that MACRO's offer an adequate mechanism for specifying special form definitions and that FEXPR's do not. Evidence is given which supports the author's contention that FEXPR's interfere with the correct operation of code-analyzing programs such as the compiler. Finally, it is suggested that, in the design of future Lisp dialects, serious consideration be given to the proposition that FEXPR's should be omitted from the language altogether.