Skip to main content Accessibility help
×
Hostname: page-component-76fb5796d-qxdb6 Total loading time: 0 Render date: 2024-04-27T02:16:12.410Z Has data issue: false hasContentIssue false

2 - Lisp, 1, 2, … ω

Published online by Cambridge University Press:  05 June 2012

Christian Queinnec
Affiliation:
Ecole Polytechnique, Paris
Get access

Summary

Since functions occupy a central place in Lisp, and because their efficiency is so crucial, there have been many experiments and a great deal of research about functions. Indeed, some of those experiments continue today. This chapter explains various ways of thinking about functions and functional applications. It will carry us up to what we'll call Lisp1 or Lisp2, their differences depending on the concept of separate name spaces. The chapter closes with a look at recursion and its implementation in these various contexts.

Among all the objects that an evaluator can handle, a function represents a very special case. This basic type has a special creator, lambda, and at least one legal operation: application. We could hardly constrain a type less without stripping away all its utility. Incidentally, this fact—that it has few qualities—makes a function particularly attractive for specifications or encapsulations because it is opaque and thus allows only what it is programmed for. We can, for example, use functions to represent objects that have fields and methods (that is, data members and member functions) as in [AR88]. Scheme-users are particularly appreciative of functions.

Attempts to increase the efficiency of functions have motivated many, often incompatible, variations. Historically, Lisp 1.5 [MAE+62] did not recognize the idea of a functional object. Its internals were such, by the way, that a variable, a function, a macro—all three—could co-exist with the same name, and at the same time, the three were represented with different properties (APVAL, EXPR, or MACRO) on the P-list of the associated symbol.

Type
Chapter
Information
Publisher: Cambridge University Press
Print publication year: 1996

Access options

Get access to the full version of this content by using one of the access options below. (Log in options will check for institutional or personal access. Content may require purchase if you do not have access.)

Save book to Kindle

To save this book to your Kindle, first ensure coreplatform@cambridge.org is added to your Approved Personal Document E-mail List under your Personal Document Settings on the Manage Your Content and Devices page of your Amazon account. Then enter the ‘name’ part of your Kindle email address below. Find out more about saving to your Kindle.

Note you can select to save to either the @free.kindle.com or @kindle.com variations. ‘@free.kindle.com’ emails are free but can only be saved to your device when it is connected to wi-fi. ‘@kindle.com’ emails can be delivered even when you are not connected to wi-fi, but note that service fees apply.

Find out more about the Kindle Personal Document Service.

Available formats
×

Save book to Dropbox

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Dropbox.

Available formats
×

Save book to Google Drive

To save content items to your account, please confirm that you agree to abide by our usage policies. If this is the first time you use this feature, you will be asked to authorise Cambridge Core to connect with your account. Find out more about saving content to Google Drive.

Available formats
×