Reserved and Forbidden Names

Check which names you can bind, which forms produce E120, and which notation errors occur before evaluation.

Use this page to choose a valid variable or parameter name and understand E110 and E120. The tables separate names checked by the normalizer from notation rejected by the reader.

Try an ordinary name

Paste this complete program into the Playground.

LISPEX
(define else 5)

else

Result

OUTPUT
5

else is an ordinary name except at the start of a cond, case, or guard clause. In those positions it marks the clause used when no earlier clause matches.

Compare these separate inputs:

SourceResult or diagnostic codeReason
(define if 5)E110if is reserved and cannot be bound
ifE110if names a form, not a procedure value
(define include 1)E120include is forbidden in code
'includeincludequoted data can contain this symbol

The normalizer checks these names before evaluation. It also checks expression shapes and rewrites shorthand into core forms.

The 27 reserved names

Binding gives a name a value, as in define, let, or a parameter list. Binding any name below produces E110.

GroupNames
quotingquote quasiquote unquote unquote-splicing
corelambda if begin set! define
bindinglet let* letrec
branchingcond case guard and or when unless do
modulesmodule export import
values and controlvalues call-with-values call/cc dynamic-wind

The four names in the last row also refer to procedures, so you can use them as values. The other 23 name syntax forms. Using one of those as a bare value produces E110.

The 12 forbidden forms

These names produce E120 when used as code, whether as a reference, a binding name, or a call. Inside quoted data, they remain ordinary symbols.

FormsHow to express the task
define-syntax syntax-rules syntax-case let-syntax letrec-syntaxuse procedures for reusable computation; user macros are unsupported
define-values let-values let*-valuesuse call-with-values
define-library include include-ci include-library-declarationsuse module and combine source files yourself

E120 identifies a listed forbidden form or reader extension. An ordinary undefined name such as alpha instead produces E300 when evaluated.

Notation errors during reading

The reader reports these errors before normalization. See Reference for Reading Code for accepted spellings.

NotationDiagnostic code
#; datum commentE120
#lang directiveE120
square or curly bracketsE100
datum labels such as #0= and #0#E100
reader directives beginning with #!E100
radix or exactness prefixes #x #b #o #e #iE100

Use line or block comments for annotations in source. A line beginning with ;! is an ordinary comment.

Vertical bars are ordinary name characters. The text |a b| therefore reads as two names, |a and b|. It does not quote a single symbol containing a space.

Form errors and ordinary name lookup

The normalizer rejects a cond arrow clause containing => with E130. In a case clause body, => is read as an ordinary name. If that clause runs and the name is undefined, evaluation produces E300. Defining => supplies its value but does not add arrow-clause behavior.

A bare parameter name, as in (lambda args args), produces E130. To collect extra arguments, use a dotted parameter list. For example:

LISPEX
((lambda (x . rest) rest) 1 2 3)

Result

OUTPUT
(2 3)

The procedure binds x to 1 and rest to the list (2 3). A function definition can collect all arguments with (define (f . xs) xs).

Core forms · Derived forms · Errors and warnings