3.1. Evaluation [CLHS-3.1]

3.1.1. Introduction to Environments [CLHS-3.1.1]
3.1.2. Dynamic Variables [CLHS-3.1.2.1.1.2]
3.1.3. Conses as Forms [CLHS-3.1.2.1.2]

3.1.1. Introduction to Environments [CLHS-3.1.1]

Macro EXT:THE-ENVIRONMENTAs in Scheme, the macro (EXT:THE-ENVIRONMENT) returns the current lexical environment. This works only in interpreted code and is not compilable!

Function (EXT:EVAL-ENV form &OPTIONAL environment)evaluates a form in a given lexical environment, just as if the form had been a part of the program that the environment came from.

3.1.2. Dynamic Variables [CLHS-3.1.2.1.1.2]

Undefined variables”, i.e. variables which are referenced outside any lexical binding for a variable of the same name and which are not declared SPECIAL, are treated like dynamic variables in the global environment. The compiler SIGNALs a WARNING when it encounters an undefined variable.

3.1.3. Conses as Forms [CLHS-3.1.2.1.2]

Lists of the form ((SETF symbol) ...) are also treated as function forms. This makes the syntax (function-name arguments ...) consistent with the syntax (FUNCALL #'function-name arguments ...). It implements the item 7 of the [ANSI CL] issue FUNCTION-NAME:LARGE and the definition of function forms, and is consistent with the use of function names elsewhere in Common Lisp.


These notes document CLISP version 2.41Last modified: 2006-10-13