[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
shared structure, other restrictions on program=data
- To: COMMON-LISP%SU-AI@SCORE
- Subject: shared structure, other restrictions on program=data
- From: Rem@IMSSS
- Date: Tue, 03 Sep 1985 17:06:00 -0000
It is well known that not all valid LISP data objects are executable forms.
But which restrictions are enforced by CL and which aren't doesn't seem
clear/obvious and should be spelled out in the manual.
Dotted lists are illegal at the toplevel of any form (and recursively
at the toplevel of any sub-form that gets EVALuated), except in the
case of macro forms before expansion. That part is obvious to nearly all.
Car of form must be a lambda expression or defined function or macro,
number and type of arguments must be correct, etc., etc., all obvious.
No shared structure may be present, even in quoted data, in a form.
This is surprizing, but has come up in this current discussion.
This applies both to shared structure typed in via the #: mechanism,
and to expansions of macros that generate multiple references to
some structure. This all should be documented clearly.
No undeclared free variables may be referenced. This causes a difference
between interpreted and compiled behaviour in other LISPs, but causes
both interpretor and compiler to fail the same in CL.
Any other restrictions I missed?